@zsviczian/excalidraw 0.16.1-obsidian-1 → 0.16.1-obsidian-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/excalidraw.development.js +103 -26
  2. package/dist/excalidraw.production.min.js +1 -1
  3. package/package.json +1 -1
  4. package/types/actions/actionAddToLibrary.d.ts +9 -27
  5. package/types/actions/actionAlign.d.ts +8 -8
  6. package/types/actions/actionBoundText.d.ts +6 -18
  7. package/types/actions/actionCanvas.d.ts +206 -125
  8. package/types/actions/actionClipboard.d.ts +19 -49
  9. package/types/actions/actionDeleteSelected.d.ts +11 -29
  10. package/types/actions/actionDistribute.d.ts +4 -4
  11. package/types/actions/actionDuplicateSelection.d.ts +2 -2
  12. package/types/actions/actionElementLock.d.ts +8 -20
  13. package/types/actions/actionExport.d.ts +35 -89
  14. package/types/actions/actionFinalize.d.ts +8 -20
  15. package/types/actions/actionFlip.d.ts +4 -4
  16. package/types/actions/actionFrame.d.ts +11 -29
  17. package/types/actions/actionGroup.d.ts +10 -22
  18. package/types/actions/actionLinearEditor.d.ts +3 -9
  19. package/types/actions/actionMenu.d.ts +13 -31
  20. package/types/actions/actionProperties.d.ts +43 -121
  21. package/types/actions/actionSelectAll.d.ts +5 -11
  22. package/types/actions/actionStyles.d.ts +7 -13
  23. package/types/actions/actionToggleGridMode.d.ts +5 -11
  24. package/types/actions/actionToggleObjectsSnapMode.d.ts +5 -11
  25. package/types/actions/actionToggleStats.d.ts +5 -11
  26. package/types/actions/actionToggleViewMode.d.ts +5 -11
  27. package/types/actions/actionToggleZenMode.d.ts +5 -11
  28. package/types/actions/actionZindex.d.ts +8 -8
  29. package/types/actions/shortcuts.d.ts +1 -1
  30. package/types/actions/types.d.ts +1 -1
  31. package/types/appState.d.ts +7 -10
  32. package/types/components/Actions.d.ts +3 -4
  33. package/types/components/App.d.ts +7 -6
  34. package/types/components/ColorPicker/colorPickerUtils.d.ts +1 -1
  35. package/types/components/LaserTool/LaserPathManager.d.ts +28 -0
  36. package/types/components/LaserTool/LaserPointerButton.d.ts +10 -0
  37. package/types/components/LaserTool/LaserTool.d.ts +7 -0
  38. package/types/components/LayerUI.d.ts +2 -1
  39. package/types/components/dropdownMenu/DropdownMenu.d.ts +6 -3
  40. package/types/components/dropdownMenu/DropdownMenuItem.d.ts +2 -1
  41. package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -1
  42. package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +2 -1
  43. package/types/components/dropdownMenu/common.d.ts +1 -1
  44. package/types/components/icons.d.ts +2 -0
  45. package/types/components/main-menu/MainMenu.d.ts +6 -3
  46. package/types/element/Hyperlink.d.ts +5 -11
  47. package/types/element/embeddable.d.ts +3 -9
  48. package/types/element/linearElementEditor.d.ts +3 -9
  49. package/types/types.d.ts +16 -17
  50. package/types/utils.d.ts +3 -4
@@ -30,6 +30,17 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
30
30
 
31
31
  /***/ }),
32
32
 
33
+ /***/ "../../../node_modules/@excalidraw/laser-pointer/dist/esm.js":
34
+ /*!*******************************************************************!*\
35
+ !*** ../../../node_modules/@excalidraw/laser-pointer/dist/esm.js ***!
36
+ \*******************************************************************/
37
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
38
+
39
+ "use strict";
40
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LaserPointer\": () => (/* binding */ $94cfa2cfccc8cc22$export$6531021b3bf36eae)\n/* harmony export */ });\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\nvar $94cfa2cfccc8cc22$exports = {};\n\n$parcel$export($94cfa2cfccc8cc22$exports, \"LaserPointer\", () => $94cfa2cfccc8cc22$export$6531021b3bf36eae);\nfunction $8cd7efb5af385306$export$e16d8520af44a096([ax, ay, ar], [bx, by, br]) {\n return [\n ax + bx,\n ay + by,\n ar + br\n ];\n}\nfunction $8cd7efb5af385306$export$f93b5905241a7cca([ax, ay, ar], [bx, by, br]) {\n return [\n ax - bx,\n ay - by,\n ar - br\n ];\n}\nfunction $8cd7efb5af385306$export$1c8884ee32bdf443([x, y, r], s) {\n return [\n x * s,\n y * s,\n r * s\n ];\n}\nfunction $8cd7efb5af385306$export$1991ecd29cc92c6b([x, y, r]) {\n return [\n x / Math.sqrt(x ** 2 + y ** 2),\n y / Math.sqrt(x ** 2 + y ** 2),\n r\n ];\n}\nfunction $8cd7efb5af385306$export$855df823ceb9b81b([x, y, r], rad) {\n return [\n Math.cos(rad) * x - Math.sin(rad) * y,\n Math.sin(rad) * x + Math.cos(rad) * y,\n r\n ];\n}\nfunction $8cd7efb5af385306$export$92d8e23769117a5e(a, b, t) {\n return $8cd7efb5af385306$export$e16d8520af44a096(a, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$f93b5905241a7cca(b, a), t));\n}\nfunction $8cd7efb5af385306$export$3a89f8d6f6bf6c9f(a, b, t) {\n return a + (b - a) * t;\n}\nfunction $8cd7efb5af385306$export$944b09d2ad10b378(p, p1, p2) {\n return Math.atan2(p2[1] - p[1], p2[0] - p[0]) - Math.atan2(p1[1] - p[1], p1[0] - p[0]);\n}\nfunction $8cd7efb5af385306$export$3c05aaf71f141f73(a) {\n return Math.atan2(Math.sin(a), Math.cos(a));\n}\nfunction $8cd7efb5af385306$export$1b9bab504faa9305([x, y]) {\n return Math.sqrt(x ** 2 + y ** 2);\n}\nfunction $8cd7efb5af385306$export$6c4a311cc157c764([ax, ay], [bx, by]) {\n return Math.sqrt((bx - ax) ** 2 + (by - ay) ** 2);\n}\nfunction $8cd7efb5af385306$export$46f6d3e1b4bd7c8b(point, direction, radius) {\n return [\n $8cd7efb5af385306$export$e16d8520af44a096(point, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$855df823ceb9b81b(direction, Math.PI / 2)), radius)),\n $8cd7efb5af385306$export$e16d8520af44a096(point, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$855df823ceb9b81b(direction, -Math.PI / 2)), radius))\n ];\n}\nfunction $8cd7efb5af385306$export$ccb1b4dfbd3f36a7(ps) {\n if (ps.length < 2) return 0;\n let len = 0;\n for(let i = 1; i <= ps.length - 1; i++)len += $8cd7efb5af385306$export$6c4a311cc157c764(ps[i - 1], ps[i]);\n len += $8cd7efb5af385306$export$6c4a311cc157c764(ps[ps.length - 2], ps[ps.length - 1]);\n return len;\n}\nconst $8cd7efb5af385306$export$7d15b64cf5a3a4c4 = (v, min, max)=>Math.max(min, Math.min(max, v));\nfunction $8cd7efb5af385306$export$548cc43590159af6(p3, p1, p2) {\n const sMag = $8cd7efb5af385306$export$6c4a311cc157c764(p1, p2);\n if (sMag === 0) return $8cd7efb5af385306$export$6c4a311cc157c764(p3, p1);\n const u = $8cd7efb5af385306$export$7d15b64cf5a3a4c4(((p3[0] - p1[0]) * (p2[0] - p1[0]) + (p3[1] - p1[1]) * (p2[1] - p1[1])) / sMag ** 2, 0, 1);\n const pi = [\n p1[0] + u * (p2[0] - p1[0]),\n p1[1] + u * (p2[1] - p1[1]),\n p3[2]\n ];\n return $8cd7efb5af385306$export$6c4a311cc157c764(pi, p3);\n}\n\n\n\nfunction $34bab0059f842ce6$export$ef693d1572e64fb8(points, epsilon) {\n if (epsilon === 0) return points;\n if (points.length <= 2) return points;\n const first = points[0];\n const last = points[points.length - 1];\n const [maxDistance, maxIndex] = points.reduce(([maxDistance, maxIndex], point, index)=>{\n const distance = (0, $8cd7efb5af385306$export$548cc43590159af6)(point, first, last);\n return distance > maxDistance ? [\n distance,\n index\n ] : [\n maxDistance,\n maxIndex\n ];\n }, [\n 0,\n -1\n ]);\n if (maxDistance >= epsilon) {\n const maxIndexPoint = points[maxIndex];\n return [\n ...$34bab0059f842ce6$export$ef693d1572e64fb8([\n first,\n ...points.slice(1, maxIndex),\n maxIndexPoint\n ], epsilon).slice(0, -1),\n maxIndexPoint,\n ...$34bab0059f842ce6$export$ef693d1572e64fb8([\n maxIndexPoint,\n ...points.slice(maxIndex, -1),\n last\n ], epsilon).slice(1)\n ];\n } else return [\n first,\n last\n ];\n}\n\n\nclass $94cfa2cfccc8cc22$export$6531021b3bf36eae {\n static #_ = (()=>{\n this.defaults = {\n size: 2,\n streamline: 0.45,\n simplify: 0.1,\n simplifyPhase: \"output\",\n sizeMapping: ()=>1\n };\n })();\n static #_1 = (()=>{\n this.constants = {\n cornerDetectionMaxAngle: 120,\n cornerDetectionVariance: (s)=>s > 35 ? 0.5 : 1,\n maxTailLength: 50\n };\n })();\n constructor(options){\n this.originalPoints = [];\n this.stablePoints = [];\n this.tailPoints = [];\n this.isFresh = true;\n this.options = Object.assign({}, $94cfa2cfccc8cc22$export$6531021b3bf36eae.defaults, options);\n }\n get lastPoint() {\n return this.tailPoints[this.tailPoints.length - 1] ?? this.stablePoints[this.stablePoints.length - 1];\n }\n addPoint(point) {\n const lastPoint = this.originalPoints[this.originalPoints.length - 1];\n if (lastPoint && lastPoint[0] === point[0] && lastPoint[1] === point[1]) return;\n this.originalPoints.push(point);\n if (this.isFresh) {\n this.isFresh = false;\n this.stablePoints.push(point);\n return;\n }\n if (this.options.streamline > 0) point = $8cd7efb5af385306$export$92d8e23769117a5e(this.lastPoint, point, 1 - this.options.streamline);\n this.tailPoints.push(point);\n if ($8cd7efb5af385306$export$ccb1b4dfbd3f36a7(this.tailPoints) > $94cfa2cfccc8cc22$export$6531021b3bf36eae.constants.maxTailLength) this.stabilizeTail();\n }\n close() {\n this.stabilizeTail();\n }\n stabilizeTail() {\n if (this.options.simplify > 0 && this.options.simplifyPhase == \"tail\") throw new Error(\"Not implemented yet\");\n else {\n this.stablePoints.push(...this.tailPoints);\n this.tailPoints = [];\n }\n }\n getSize(sizeOverride, pressure, index, totalLength, runningLength) {\n return (sizeOverride ?? this.options.size) * this.options.sizeMapping({\n pressure: pressure,\n runningLength: runningLength,\n currentIndex: index,\n totalLength: totalLength\n });\n }\n getStrokeOutline(sizeOverride) {\n if (this.isFresh) return [];\n let points = [\n ...this.stablePoints,\n ...this.tailPoints\n ];\n if (this.options.simplify > 0 && this.options.simplifyPhase === \"input\") points = (0, $34bab0059f842ce6$export$ef693d1572e64fb8)(points, this.options.simplify);\n const len = points.length;\n if (len === 0) return [];\n if (len === 1) {\n const c = points[0];\n const ps = [];\n for(let theta = 0; theta <= Math.PI * 2; theta += Math.PI / 16)ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$855df823ceb9b81b([\n 1,\n 0,\n 0\n ], theta), this.getSize(sizeOverride, c[2], 0, len, 0))));\n ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443([\n 1,\n 0,\n 0\n ], this.getSize(sizeOverride, c[2], 0, len, 0))));\n return ps;\n }\n if (len === 2) {\n const c = points[0];\n const n = points[1];\n const ps = [];\n const pAngle = $8cd7efb5af385306$export$944b09d2ad10b378(c, [\n c[0],\n c[1] - 100,\n c[2]\n ], n);\n for(let theta = pAngle; theta <= Math.PI + pAngle; theta += Math.PI / 16)ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$855df823ceb9b81b([\n 1,\n 0,\n 0\n ], theta), this.getSize(sizeOverride, c[2], 0, len, 0))));\n for(let theta = Math.PI + pAngle; theta <= Math.PI * 2 + pAngle; theta += Math.PI / 16)ps.push($8cd7efb5af385306$export$e16d8520af44a096(n, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$855df823ceb9b81b([\n 1,\n 0,\n 0\n ], theta), this.getSize(sizeOverride, n[2], 0, len, 0))));\n ps.push(ps[0]);\n return ps;\n }\n const forwardPoints = [];\n const backwardPoints = [];\n let speed = 0;\n let prevSpeed = 0;\n let visibleStartIndex = 0;\n let runningLength = 0;\n for(let i = 1; i < len - 1; i++){\n const p = points[i - 1], c = points[i], n = points[i + 1];\n let pressure = c[2];\n const d = $8cd7efb5af385306$export$6c4a311cc157c764(p, c);\n runningLength += d;\n speed = prevSpeed + (d - prevSpeed) * 0.2;\n const cSize = this.getSize(sizeOverride, pressure, i, len, runningLength);\n if (cSize === 0) {\n visibleStartIndex = i + 1;\n continue;\n }\n const dirPC = $8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$f93b5905241a7cca(p, c));\n const dirNC = $8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$f93b5905241a7cca(n, c));\n const p1dirPC = $8cd7efb5af385306$export$855df823ceb9b81b(dirPC, Math.PI / 2);\n const p2dirPC = $8cd7efb5af385306$export$855df823ceb9b81b(dirPC, -Math.PI / 2);\n const p1dirNC = $8cd7efb5af385306$export$855df823ceb9b81b(dirNC, Math.PI / 2);\n const p2dirNC = $8cd7efb5af385306$export$855df823ceb9b81b(dirNC, -Math.PI / 2);\n const p1PC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, cSize));\n const p2PC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443(p2dirPC, cSize));\n const p1NC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443(p1dirNC, cSize));\n const p2NC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443(p2dirNC, cSize));\n const ftdir = $8cd7efb5af385306$export$e16d8520af44a096(p1dirPC, p2dirNC);\n const btdir = $8cd7efb5af385306$export$e16d8520af44a096(p2dirPC, p1dirNC);\n const paPC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$1b9bab504faa9305(ftdir) === 0 ? dirPC : $8cd7efb5af385306$export$1991ecd29cc92c6b(ftdir), cSize));\n const paNC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$1b9bab504faa9305(btdir) === 0 ? dirNC : $8cd7efb5af385306$export$1991ecd29cc92c6b(btdir), cSize));\n const cAngle = $8cd7efb5af385306$export$3c05aaf71f141f73($8cd7efb5af385306$export$944b09d2ad10b378(c, p, n));\n const D_ANGLE = $94cfa2cfccc8cc22$export$6531021b3bf36eae.constants.cornerDetectionMaxAngle / 180 * Math.PI * $94cfa2cfccc8cc22$export$6531021b3bf36eae.constants.cornerDetectionVariance(speed);\n if (Math.abs(cAngle) < D_ANGLE) {\n const tAngle = Math.abs($8cd7efb5af385306$export$3c05aaf71f141f73(Math.PI - cAngle)) // turn angle\n ;\n if (tAngle === 0) continue;\n if (cAngle < 0) {\n backwardPoints.push(p2PC, paNC);\n for(let theta = 0; theta <= tAngle; theta += tAngle / 4)forwardPoints.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, cSize), theta)));\n for(let theta = tAngle; theta >= 0; theta -= tAngle / 4)backwardPoints.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, cSize), theta)));\n backwardPoints.push(paNC, p1NC);\n } else {\n forwardPoints.push(p1PC, paPC);\n for(let theta = 0; theta <= tAngle; theta += tAngle / 4)backwardPoints.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, -cSize), -theta)));\n for(let theta = tAngle; theta >= 0; theta -= tAngle / 4)forwardPoints.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, -cSize), -theta)));\n forwardPoints.push(paPC, p2NC);\n }\n } else {\n forwardPoints.push(paPC);\n backwardPoints.push(paNC);\n }\n prevSpeed = speed;\n }\n const first = points[visibleStartIndex];\n const second = points[visibleStartIndex + 1];\n const penultimate = points[len - 2];\n const ultimate = points[len - 1];\n if (visibleStartIndex >= len - 2) return [];\n const dirFS = $8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$f93b5905241a7cca(second, first));\n const dirPU = $8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$f93b5905241a7cca(penultimate, ultimate));\n const ppdirFS = $8cd7efb5af385306$export$855df823ceb9b81b(dirFS, -Math.PI / 2);\n const ppdirPU = $8cd7efb5af385306$export$855df823ceb9b81b(dirPU, Math.PI / 2);\n const startCapSize = this.getSize(sizeOverride, first[2], 0, len, 0);\n const startCap = [];\n const endCapSize = this.getSize(sizeOverride, penultimate[2], len - 2, len, runningLength);\n const endCap = [];\n for(let theta = 0; theta <= Math.PI; theta += Math.PI / 16)startCap.unshift($8cd7efb5af385306$export$e16d8520af44a096(first, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(ppdirFS, startCapSize), -theta)));\n startCap.unshift($8cd7efb5af385306$export$e16d8520af44a096(first, $8cd7efb5af385306$export$1c8884ee32bdf443(ppdirFS, -startCapSize)));\n for(let theta = 0; theta <= Math.PI; theta += Math.PI / 16)endCap.push($8cd7efb5af385306$export$e16d8520af44a096(ultimate, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(ppdirPU, -endCapSize), -theta)));\n const strokeOutline = [\n ...startCap,\n ...forwardPoints,\n ...endCap.reverse(),\n ...backwardPoints.reverse()\n ];\n if (startCap.length > 0) strokeOutline.push(startCap[0]);\n if (this.options.simplify > 0 && this.options.simplifyPhase === \"output\") return (0, $34bab0059f842ce6$export$ef693d1572e64fb8)(strokeOutline, this.options.simplify);\n return strokeOutline;\n }\n}\n\n\n\n\n\n//# sourceMappingURL=esm.js.map\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../../node_modules/@excalidraw/laser-pointer/dist/esm.js?");
41
+
42
+ /***/ }),
43
+
33
44
  /***/ "../../../node_modules/@excalidraw/markdown-to-text/dist/index.js":
34
45
  /*!************************************************************************!*\
35
46
  !*** ../../../node_modules/@excalidraw/markdown-to-text/dist/index.js ***!
@@ -1406,6 +1417,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
1406
1417
 
1407
1418
  /***/ }),
1408
1419
 
1420
+ /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js!../../components/LaserTool/LaserToolOverlay.scss":
1421
+ /*!***********************************************************************************************************************************************************************************************************!*\
1422
+ !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js!../../components/LaserTool/LaserToolOverlay.scss ***!
1423
+ \***********************************************************************************************************************************************************************************************************/
1424
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
1425
+
1426
+ "use strict";
1427
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../packages/excalidraw/node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../packages/excalidraw/node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".excalidraw .LaserToolOverlay {\\n pointer-events: none;\\n width: 100vw;\\n height: 100vh;\\n position: fixed;\\n top: 0;\\n left: 0;\\n z-index: 2;\\n}\\n.excalidraw .LaserToolOverlay .LaserToolOverlayCanvas {\\n image-rendering: auto;\\n overflow: visible;\\n position: absolute;\\n top: 0;\\n left: 0;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/LaserTool/LaserToolOverlay.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet%5B1%5D.rules%5B0%5D.use%5B2%5D!./node_modules/sass-loader/dist/cjs.js");
1428
+
1429
+ /***/ }),
1430
+
1409
1431
  /***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js!../../components/LayerUI.scss":
1410
1432
  /*!****************************************************************************************************************************************************************************************!*\
1411
1433
  !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js!../../components/LayerUI.scss ***!
@@ -1633,7 +1655,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
1633
1655
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
1634
1656
 
1635
1657
  "use strict";
1636
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../packages/excalidraw/node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../packages/excalidraw/node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":export {\\n themeFilter: invert(93%) hue-rotate(180deg);\\n rightSidebarWidth: 302px;\\n}\\n\\n.excalidraw .ToolIcon {\\n border-radius: var(--border-radius-lg);\\n display: inline-flex;\\n align-items: center;\\n position: relative;\\n cursor: pointer;\\n -webkit-tap-highlight-color: transparent;\\n -webkit-user-select: none;\\n user-select: none;\\n}\\n.excalidraw .ToolIcon__hidden {\\n display: none !important;\\n}\\n.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked + .ToolIcon__icon,\\n.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked + .ToolIcon__icon {\\n --icon-fill-color: var(--color-primary-darker);\\n}\\n.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked + .ToolIcon__icon svg,\\n.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked + .ToolIcon__icon svg {\\n fill: var(--icon-fill-color);\\n}\\n.excalidraw .ToolIcon .ToolIcon_type_radio:checked + .ToolIcon__icon,\\n.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked + .ToolIcon__icon {\\n background: var(--color-primary-light);\\n --keybinding-color: var(--color-gray-60);\\n}\\n.excalidraw .ToolIcon .ToolIcon_type_radio:checked + .ToolIcon__icon svg,\\n.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked + .ToolIcon__icon svg {\\n color: var(--color-primary-darker);\\n}\\n.excalidraw .ToolIcon .ToolIcon__keybinding {\\n bottom: 4px;\\n right: 4px;\\n}\\n.excalidraw .ToolIcon .ToolIcon__icon:hover {\\n background: var(--button-hover-bg);\\n}\\n.excalidraw .ToolIcon .ToolIcon__icon:active {\\n background: var(--button-hover-bg);\\n border: 1px solid var(--color-primary-darkest);\\n}\\n.excalidraw .ToolIcon--plain {\\n background-color: transparent;\\n}\\n.excalidraw .ToolIcon--plain .ToolIcon__icon {\\n width: 2rem;\\n height: 2rem;\\n}\\n.excalidraw .ToolIcon_type_radio,\\n.excalidraw .ToolIcon_type_checkbox {\\n position: absolute;\\n opacity: 0;\\n pointer-events: none;\\n}\\n.excalidraw .ToolIcon__icon {\\n box-sizing: border-box;\\n width: var(--default-button-size);\\n height: var(--default-button-size);\\n color: var(--icon-fill-color);\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n border-radius: var(--border-radius-lg);\\n}\\n.excalidraw .ToolIcon__icon + .ToolIcon__label {\\n margin-inline-start: 0;\\n}\\n.excalidraw .ToolIcon__icon svg {\\n position: relative;\\n width: var(--default-icon-size);\\n height: var(--default-icon-size);\\n color: var(--icon-fill-color);\\n}\\n.excalidraw .ToolIcon__label {\\n display: flex;\\n align-items: center;\\n color: var(--icon-fill-color);\\n font-family: var(--ui-font);\\n margin: 0 0.8em;\\n text-overflow: ellipsis;\\n}\\n.excalidraw .ToolIcon__label .Spinner {\\n margin-left: 0.6em;\\n}\\n.excalidraw .ToolIcon_size_small .ToolIcon__icon {\\n width: 2rem;\\n height: 2rem;\\n font-size: 0.8em;\\n}\\n.excalidraw .ToolIcon_type_button,\\n.excalidraw .Modal .ToolIcon_type_button,\\n.excalidraw .ToolIcon_type_button {\\n padding: 0;\\n border: none;\\n margin: 0;\\n font-size: inherit;\\n background-color: initial;\\n}\\n.excalidraw .ToolIcon_type_button:focus-visible,\\n.excalidraw .Modal .ToolIcon_type_button:focus-visible,\\n.excalidraw .ToolIcon_type_button:focus-visible {\\n box-shadow: 0 0 0 2px var(--focus-highlight-color);\\n}\\n.excalidraw .ToolIcon_type_button.ToolIcon--selected,\\n.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected,\\n.excalidraw .ToolIcon_type_button.ToolIcon--selected {\\n background-color: var(--button-gray-2);\\n}\\n.excalidraw .ToolIcon_type_button.ToolIcon--selected:active,\\n.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected:active,\\n.excalidraw .ToolIcon_type_button.ToolIcon--selected:active {\\n background-color: var(--button-gray-3);\\n}\\n.excalidraw .ToolIcon_type_button:active,\\n.excalidraw .Modal .ToolIcon_type_button:active,\\n.excalidraw .ToolIcon_type_button:active {\\n background-color: var(--button-gray-3);\\n}\\n.excalidraw .ToolIcon_type_button--show,\\n.excalidraw .Modal .ToolIcon_type_button--show,\\n.excalidraw .ToolIcon_type_button--show {\\n visibility: visible;\\n}\\n.excalidraw .ToolIcon_type_button--hide,\\n.excalidraw .Modal .ToolIcon_type_button--hide,\\n.excalidraw .ToolIcon_type_button--hide {\\n display: none !important;\\n}\\n.excalidraw .ToolIcon_type_floating {\\n background-color: transparent;\\n}\\n.excalidraw .ToolIcon_type_floating:hover {\\n background-color: transparent;\\n}\\n.excalidraw .ToolIcon_type_floating:active {\\n background-color: transparent;\\n}\\n.excalidraw .ToolIcon_type_floating .ToolIcon__icon {\\n background-color: var(--button-gray-1);\\n width: 2rem;\\n height: 2rem;\\n}\\n.excalidraw .ToolIcon_type_floating .ToolIcon__icon:hover {\\n background-color: var(--button-gray-2);\\n}\\n.excalidraw .ToolIcon_type_floating .ToolIcon__icon:active {\\n background-color: var(--button-gray-3);\\n}\\n.excalidraw .ToolIcon__keybinding {\\n position: absolute;\\n bottom: 2px;\\n right: 3px;\\n font-size: 0.625rem;\\n color: var(--keybinding-color);\\n font-family: var(--ui-font);\\n -webkit-user-select: none;\\n user-select: none;\\n}\\n:root[dir=ltr] .excalidraw .unlocked-icon {\\n left: 2px;\\n}\\n:root[dir=rtl] .excalidraw .unlocked-icon {\\n right: 2px;\\n}\\n.excalidraw .App-toolbar-container .ToolIcon__icon {\\n width: var(--lg-button-size);\\n height: var(--lg-button-size);\\n}\\n@media screen and (max-width: 450px) {\\n .excalidraw .App-toolbar-container .ToolIcon__icon {\\n width: 1.8rem;\\n height: 1.8rem;\\n }\\n}\\n@media screen and (max-width: 379px) {\\n .excalidraw .App-toolbar-container .ToolIcon__icon {\\n width: 1.5rem;\\n height: 1.5rem;\\n }\\n}\\n.excalidraw .App-toolbar-container .ToolIcon__icon svg {\\n width: var(--lg-icon-size);\\n height: var(--lg-icon-size);\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/ToolIcon.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet%5B1%5D.rules%5B0%5D.use%5B2%5D!./node_modules/sass-loader/dist/cjs.js");
1658
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../packages/excalidraw/node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../packages/excalidraw/node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":export {\\n themeFilter: invert(93%) hue-rotate(180deg);\\n rightSidebarWidth: 302px;\\n}\\n\\n.excalidraw .ToolIcon {\\n border-radius: var(--border-radius-lg);\\n display: inline-flex;\\n align-items: center;\\n position: relative;\\n cursor: pointer;\\n -webkit-tap-highlight-color: transparent;\\n -webkit-user-select: none;\\n user-select: none;\\n}\\n.excalidraw .ToolIcon__hidden {\\n display: none !important;\\n}\\n.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked + .ToolIcon__icon,\\n.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked + .ToolIcon__icon {\\n --icon-fill-color: var(--color-primary-darker);\\n}\\n.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked + .ToolIcon__icon svg,\\n.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked + .ToolIcon__icon svg {\\n fill: var(--icon-fill-color);\\n}\\n.excalidraw .ToolIcon .ToolIcon_type_radio:checked + .ToolIcon__icon,\\n.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked + .ToolIcon__icon {\\n background: var(--color-primary-light);\\n --keybinding-color: var(--color-gray-60);\\n}\\n.excalidraw .ToolIcon .ToolIcon_type_radio:checked + .ToolIcon__icon svg,\\n.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked + .ToolIcon__icon svg {\\n color: var(--color-primary-darker);\\n}\\n.excalidraw .ToolIcon .ToolIcon__keybinding {\\n bottom: 4px;\\n right: 4px;\\n}\\n.excalidraw .ToolIcon .ToolIcon__icon:hover {\\n background: var(--button-hover-bg);\\n}\\n.excalidraw .ToolIcon .ToolIcon__icon:active {\\n background: var(--button-hover-bg);\\n border: 1px solid var(--color-primary-darkest);\\n}\\n.excalidraw .ToolIcon--plain {\\n background-color: transparent;\\n}\\n.excalidraw .ToolIcon--plain .ToolIcon__icon {\\n width: 2rem;\\n height: 2rem;\\n}\\n.excalidraw .ToolIcon_type_radio,\\n.excalidraw .ToolIcon_type_checkbox {\\n position: absolute;\\n opacity: 0;\\n pointer-events: none;\\n}\\n.excalidraw .ToolIcon__icon {\\n box-sizing: border-box;\\n width: var(--default-button-size);\\n height: var(--default-button-size);\\n color: var(--icon-fill-color);\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n border-radius: var(--border-radius-lg);\\n}\\n.excalidraw .ToolIcon__icon + .ToolIcon__label {\\n margin-inline-start: 0;\\n}\\n.excalidraw .ToolIcon__icon svg {\\n position: relative;\\n width: var(--default-icon-size);\\n height: var(--default-icon-size);\\n color: var(--icon-fill-color);\\n}\\n.excalidraw .ToolIcon__label {\\n display: flex;\\n align-items: center;\\n color: var(--icon-fill-color);\\n font-family: var(--ui-font);\\n margin: 0 0.8em;\\n text-overflow: ellipsis;\\n}\\n.excalidraw .ToolIcon__label .Spinner {\\n margin-left: 0.6em;\\n}\\n.excalidraw .ToolIcon_size_small .ToolIcon__icon {\\n width: 2rem;\\n height: 2rem;\\n font-size: 0.8em;\\n}\\n.excalidraw .ToolIcon_type_button,\\n.excalidraw .Modal .ToolIcon_type_button,\\n.excalidraw .ToolIcon_type_button {\\n padding: 0;\\n border: none;\\n margin: 0;\\n font-size: inherit;\\n background-color: initial;\\n}\\n.excalidraw .ToolIcon_type_button:focus-visible,\\n.excalidraw .Modal .ToolIcon_type_button:focus-visible,\\n.excalidraw .ToolIcon_type_button:focus-visible {\\n box-shadow: 0 0 0 2px var(--focus-highlight-color);\\n}\\n.excalidraw .ToolIcon_type_button.ToolIcon--selected,\\n.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected,\\n.excalidraw .ToolIcon_type_button.ToolIcon--selected {\\n background-color: var(--button-gray-2);\\n}\\n.excalidraw .ToolIcon_type_button.ToolIcon--selected:active,\\n.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected:active,\\n.excalidraw .ToolIcon_type_button.ToolIcon--selected:active {\\n background-color: var(--button-gray-3);\\n}\\n.excalidraw .ToolIcon_type_button:active,\\n.excalidraw .Modal .ToolIcon_type_button:active,\\n.excalidraw .ToolIcon_type_button:active {\\n background-color: var(--button-gray-3);\\n}\\n.excalidraw .ToolIcon_type_button--show,\\n.excalidraw .Modal .ToolIcon_type_button--show,\\n.excalidraw .ToolIcon_type_button--show {\\n visibility: visible;\\n}\\n.excalidraw .ToolIcon_type_button--hide,\\n.excalidraw .Modal .ToolIcon_type_button--hide,\\n.excalidraw .ToolIcon_type_button--hide {\\n display: none !important;\\n}\\n.excalidraw .ToolIcon_type_floating {\\n background-color: transparent;\\n}\\n.excalidraw .ToolIcon_type_floating:hover {\\n background-color: transparent;\\n}\\n.excalidraw .ToolIcon_type_floating:active {\\n background-color: transparent;\\n}\\n.excalidraw .ToolIcon_type_floating .ToolIcon__icon {\\n background-color: var(--button-gray-1);\\n width: 2rem;\\n height: 2rem;\\n}\\n.excalidraw .ToolIcon_type_floating .ToolIcon__icon:hover {\\n background-color: var(--button-gray-2);\\n}\\n.excalidraw .ToolIcon_type_floating .ToolIcon__icon:active {\\n background-color: var(--button-gray-3);\\n}\\n.excalidraw .ToolIcon__keybinding {\\n position: absolute;\\n bottom: 2px;\\n right: 3px;\\n font-size: 0.625rem;\\n color: var(--keybinding-color);\\n font-family: var(--ui-font);\\n -webkit-user-select: none;\\n user-select: none;\\n}\\n:root[dir=ltr] .excalidraw .unlocked-icon {\\n left: 2px;\\n}\\n:root[dir=rtl] .excalidraw .unlocked-icon {\\n right: 2px;\\n}\\n.excalidraw .App-toolbar-container .ToolIcon__icon {\\n width: var(--lg-button-size);\\n height: var(--lg-button-size);\\n}\\n@media screen and (max-width: 450px) {\\n .excalidraw .App-toolbar-container .ToolIcon__icon {\\n width: 1.8rem;\\n height: 1.8rem;\\n }\\n}\\n@media screen and (max-width: 379px) {\\n .excalidraw .App-toolbar-container .ToolIcon__icon {\\n width: 1.5rem;\\n height: 1.5rem;\\n }\\n}\\n.excalidraw .App-toolbar-container .ToolIcon__icon svg {\\n width: var(--lg-icon-size);\\n height: var(--lg-icon-size);\\n}\\n.excalidraw .App-toolbar-container .ToolIcon__LaserPointer .ToolIcon__icon {\\n width: var(--default-button-size);\\n height: var(--default-button-size);\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/ToolIcon.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet%5B1%5D.rules%5B0%5D.use%5B2%5D!./node_modules/sass-loader/dist/cjs.js");
1637
1659
 
1638
1660
  /***/ }),
1639
1661
 
@@ -1644,7 +1666,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
1644
1666
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
1645
1667
 
1646
1668
  "use strict";
1647
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../packages/excalidraw/node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../packages/excalidraw/node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":export {\\n themeFilter: invert(93%) hue-rotate(180deg);\\n rightSidebarWidth: 302px;\\n}\\n\\n.excalidraw .App-toolbar.zen-mode .ToolIcon__keybinding,\\n.excalidraw .App-toolbar.zen-mode .HintViewer {\\n display: none;\\n}\\n.excalidraw .App-toolbar__divider {\\n width: 1px;\\n height: 1.5rem;\\n align-self: center;\\n background-color: var(--default-border-color);\\n margin: 0 0.25rem;\\n}\\n.excalidraw--mobile.excalidraw .App-toolbar__divider {\\n margin: 0;\\n}\\n\\n.excalidraw .App-toolbar__extra-tools-trigger {\\n box-shadow: none;\\n border: 0;\\n}\\n.excalidraw .App-toolbar__extra-tools-trigger:active {\\n background-color: var(--button-hover-bg);\\n box-shadow: 0 0 0 1px var(--button-active-border, var(--color-primary-darkest)) inset;\\n}\\n.excalidraw .App-toolbar__extra-tools-dropdown {\\n margin-top: 0.375rem;\\n right: 0;\\n min-width: 11.875rem;\\n z-index: 1;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/Toolbar.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet%5B1%5D.rules%5B0%5D.use%5B2%5D!./node_modules/sass-loader/dist/cjs.js");
1669
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../packages/excalidraw/node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../packages/excalidraw/node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":export {\\n themeFilter: invert(93%) hue-rotate(180deg);\\n rightSidebarWidth: 302px;\\n}\\n\\n.excalidraw .App-toolbar.zen-mode .ToolIcon__keybinding,\\n.excalidraw .App-toolbar.zen-mode .HintViewer {\\n display: none;\\n}\\n.excalidraw .App-toolbar__divider {\\n width: 1px;\\n height: 1.5rem;\\n align-self: center;\\n background-color: var(--default-border-color);\\n margin: 0 0.25rem;\\n}\\n.excalidraw--mobile.excalidraw .App-toolbar__divider {\\n margin: 0;\\n}\\n\\n.excalidraw .App-toolbar__extra-tools-trigger {\\n box-shadow: none;\\n border: 0;\\n}\\n.excalidraw .App-toolbar__extra-tools-trigger:active {\\n background-color: var(--button-hover-bg);\\n box-shadow: 0 0 0 1px var(--button-active-border, var(--color-primary-darkest)) inset;\\n}\\n.excalidraw .App-toolbar__extra-tools-trigger--selected, .excalidraw .App-toolbar__extra-tools-trigger--selected:hover {\\n background: var(--color-primary-light);\\n color: var(--color-primary);\\n}\\n.excalidraw .App-toolbar__extra-tools-dropdown {\\n margin-top: 0.375rem;\\n right: 0;\\n min-width: 11.875rem;\\n z-index: 1;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/Toolbar.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet%5B1%5D.rules%5B0%5D.use%5B2%5D!./node_modules/sass-loader/dist/cjs.js");
1648
1670
 
1649
1671
  /***/ }),
1650
1672
 
@@ -1677,7 +1699,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
1677
1699
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
1678
1700
 
1679
1701
  "use strict";
1680
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../packages/excalidraw/node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../packages/excalidraw/node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":export {\\n themeFilter: invert(93%) hue-rotate(180deg);\\n rightSidebarWidth: 302px;\\n}\\n\\n.excalidraw .dropdown-menu {\\n position: absolute;\\n top: 100%;\\n margin-top: 0.25rem;\\n}\\n.excalidraw .dropdown-menu--mobile {\\n left: 0;\\n width: 100%;\\n row-gap: 0.75rem;\\n}\\n.excalidraw .dropdown-menu--mobile .dropdown-menu-container {\\n padding: 8px 8px;\\n box-sizing: border-box;\\n background-color: var(--island-bg-color);\\n box-shadow: var(--shadow-island);\\n border-radius: var(--border-radius-lg);\\n position: relative;\\n transition: box-shadow 0.5s ease-in-out;\\n}\\n.excalidraw .dropdown-menu--mobile .dropdown-menu-container.zen-mode {\\n box-shadow: none;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-container {\\n background-color: var(--island-bg-color);\\n max-height: calc(100vh - 150px);\\n overflow-y: auto;\\n --gap: 2;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item-base {\\n display: flex;\\n padding: 0 0.625rem;\\n column-gap: 0.625rem;\\n font-size: 0.875rem;\\n color: var(--color-gray-100);\\n width: 100%;\\n box-sizing: border-box;\\n font-weight: normal;\\n font-family: inherit;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item {\\n background-color: transparent;\\n border: 0;\\n align-items: center;\\n height: 2rem;\\n cursor: pointer;\\n border-radius: var(--border-radius-md);\\n}\\n@media screen and (min-width: 1921px) {\\n .excalidraw .dropdown-menu .dropdown-menu-item {\\n height: 2.25rem;\\n }\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item__text {\\n text-overflow: ellipsis;\\n overflow: hidden;\\n white-space: nowrap;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item__shortcut {\\n margin-inline-start: auto;\\n opacity: 0.5;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item:hover {\\n background-color: var(--button-hover) !important;\\n text-decoration: none;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item svg {\\n width: 1rem;\\n height: 1rem;\\n display: block;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item-custom {\\n margin-top: 0.5rem;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-group-title {\\n font-size: 14px;\\n text-align: left;\\n margin: 10px 0;\\n font-weight: 500;\\n}\\n.excalidraw.theme--dark .dropdown-menu-item {\\n color: var(--color-gray-40);\\n}\\n.excalidraw.theme--dark .dropdown-menu-container {\\n background-color: var(--island-bg-color);\\n}\\n.excalidraw .dropdown-menu-button {\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n padding: 0.625rem;\\n width: var(--button-width, var(--default-button-size));\\n height: var(--button-height, var(--default-button-size));\\n box-sizing: border-box;\\n border-width: 1px;\\n border-style: solid;\\n border-color: var(--button-border, var(--default-border-color));\\n border-radius: var(--border-radius-lg);\\n cursor: pointer;\\n background-color: var(--button-bg, var(--island-bg-color));\\n color: var(--button-color, var(--text-primary-color));\\n background-color: var(--island-bg-color);\\n width: var(--lg-button-size);\\n height: var(--lg-button-size);\\n margin: 0;\\n padding: 0;\\n}\\n.excalidraw .dropdown-menu-button svg {\\n width: var(--button-width, var(--lg-icon-size));\\n height: var(--button-height, var(--lg-icon-size));\\n}\\n.excalidraw .dropdown-menu-button:hover {\\n background-color: var(--button-hover-bg, var(--island-bg-color));\\n border-color: var(--button-hover-border, var(--button-border, var(--default-border-color)));\\n color: var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)));\\n}\\n.excalidraw .dropdown-menu-button:active {\\n background-color: var(--button-active-bg, var(--island-bg-color));\\n border-color: var(--button-active-border, var(--color-primary-darkest));\\n}\\n.excalidraw .dropdown-menu-button.active {\\n background-color: var(--button-selected-bg, var(--color-primary-light));\\n border-color: var(--button-selected-border, var(--color-primary-light));\\n}\\n.excalidraw .dropdown-menu-button.active:hover {\\n background-color: var(--button-selected-hover-bg, var(--color-primary-light));\\n}\\n.excalidraw .dropdown-menu-button.active svg {\\n color: var(--button-color, var(--color-primary-darker));\\n}\\n.excalidraw .dropdown-menu-button svg {\\n width: var(--lg-icon-size);\\n height: var(--lg-icon-size);\\n}\\n.excalidraw .dropdown-menu-button--mobile {\\n border: none;\\n margin: 0;\\n padding: 0;\\n width: var(--default-button-size);\\n height: var(--default-button-size);\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/dropdownMenu/DropdownMenu.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet%5B1%5D.rules%5B0%5D.use%5B2%5D!./node_modules/sass-loader/dist/cjs.js");
1702
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../packages/excalidraw/node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../packages/excalidraw/node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _packages_excalidraw_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_packages_excalidraw_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \":export {\\n themeFilter: invert(93%) hue-rotate(180deg);\\n rightSidebarWidth: 302px;\\n}\\n\\n.excalidraw .dropdown-menu {\\n position: absolute;\\n top: 100%;\\n margin-top: 0.25rem;\\n}\\n.excalidraw .dropdown-menu--mobile {\\n left: 0;\\n width: 100%;\\n row-gap: 0.75rem;\\n}\\n.excalidraw .dropdown-menu--mobile .dropdown-menu-container {\\n padding: 8px 8px;\\n box-sizing: border-box;\\n background-color: var(--island-bg-color);\\n box-shadow: var(--shadow-island);\\n border-radius: var(--border-radius-lg);\\n position: relative;\\n transition: box-shadow 0.5s ease-in-out;\\n}\\n.excalidraw .dropdown-menu--mobile .dropdown-menu-container.zen-mode {\\n box-shadow: none;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-container {\\n background-color: var(--island-bg-color);\\n max-height: calc(100vh - 150px);\\n overflow-y: auto;\\n --gap: 2;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item-base {\\n display: flex;\\n padding: 0 0.625rem;\\n column-gap: 0.625rem;\\n font-size: 0.875rem;\\n color: var(--color-gray-100);\\n width: 100%;\\n box-sizing: border-box;\\n font-weight: normal;\\n font-family: inherit;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item {\\n background-color: transparent;\\n border: 0;\\n align-items: center;\\n height: 2rem;\\n cursor: pointer;\\n border-radius: var(--border-radius-md);\\n}\\n@media screen and (min-width: 1921px) {\\n .excalidraw .dropdown-menu .dropdown-menu-item {\\n height: 2.25rem;\\n }\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item--selected {\\n background: var(--color-primary-light);\\n --icon-fill-color: var(--color-primary-darker);\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item__text {\\n text-overflow: ellipsis;\\n overflow: hidden;\\n white-space: nowrap;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item__shortcut {\\n margin-inline-start: auto;\\n opacity: 0.5;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item:hover {\\n background-color: var(--button-hover) !important;\\n text-decoration: none;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item svg {\\n width: 1rem;\\n height: 1rem;\\n display: block;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-item-custom {\\n margin-top: 0.5rem;\\n}\\n.excalidraw .dropdown-menu .dropdown-menu-group-title {\\n font-size: 14px;\\n text-align: left;\\n margin: 10px 0;\\n font-weight: 500;\\n}\\n.excalidraw.theme--dark .dropdown-menu-item {\\n color: var(--color-gray-40);\\n}\\n.excalidraw.theme--dark .dropdown-menu-container {\\n background-color: var(--island-bg-color);\\n}\\n.excalidraw .dropdown-menu-button {\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n padding: 0.625rem;\\n width: var(--button-width, var(--default-button-size));\\n height: var(--button-height, var(--default-button-size));\\n box-sizing: border-box;\\n border-width: 1px;\\n border-style: solid;\\n border-color: var(--button-border, var(--default-border-color));\\n border-radius: var(--border-radius-lg);\\n cursor: pointer;\\n background-color: var(--button-bg, var(--island-bg-color));\\n color: var(--button-color, var(--text-primary-color));\\n background-color: var(--island-bg-color);\\n width: var(--lg-button-size);\\n height: var(--lg-button-size);\\n margin: 0;\\n padding: 0;\\n}\\n.excalidraw .dropdown-menu-button svg {\\n width: var(--button-width, var(--lg-icon-size));\\n height: var(--button-height, var(--lg-icon-size));\\n}\\n.excalidraw .dropdown-menu-button:hover {\\n background-color: var(--button-hover-bg, var(--island-bg-color));\\n border-color: var(--button-hover-border, var(--button-border, var(--default-border-color)));\\n color: var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)));\\n}\\n.excalidraw .dropdown-menu-button:active {\\n background-color: var(--button-active-bg, var(--island-bg-color));\\n border-color: var(--button-active-border, var(--color-primary-darkest));\\n}\\n.excalidraw .dropdown-menu-button.active {\\n background-color: var(--button-selected-bg, var(--color-primary-light));\\n border-color: var(--button-selected-border, var(--color-primary-light));\\n}\\n.excalidraw .dropdown-menu-button.active:hover {\\n background-color: var(--button-selected-hover-bg, var(--color-primary-light));\\n}\\n.excalidraw .dropdown-menu-button.active svg {\\n color: var(--button-color, var(--color-primary-darker));\\n}\\n.excalidraw .dropdown-menu-button svg {\\n width: var(--lg-icon-size);\\n height: var(--lg-icon-size);\\n}\\n.excalidraw .dropdown-menu-button--mobile {\\n border: none;\\n margin: 0;\\n padding: 0;\\n width: var(--default-button-size);\\n height: var(--default-button-size);\\n}\", \"\"]);\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/dropdownMenu/DropdownMenu.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet%5B1%5D.rules%5B0%5D.use%5B2%5D!./node_modules/sass-loader/dist/cjs.js");
1681
1703
 
1682
1704
  /***/ }),
1683
1705
 
@@ -1852,7 +1874,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
1852
1874
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1853
1875
 
1854
1876
  "use strict";
1855
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"actionChangeViewBackgroundColor\": () => (/* binding */ actionChangeViewBackgroundColor),\n/* harmony export */ \"actionClearCanvas\": () => (/* binding */ actionClearCanvas),\n/* harmony export */ \"actionResetZoom\": () => (/* binding */ actionResetZoom),\n/* harmony export */ \"actionToggleEraserTool\": () => (/* binding */ actionToggleEraserTool),\n/* harmony export */ \"actionToggleHandTool\": () => (/* binding */ actionToggleHandTool),\n/* harmony export */ \"actionToggleTheme\": () => (/* binding */ actionToggleTheme),\n/* harmony export */ \"actionZoomIn\": () => (/* binding */ actionZoomIn),\n/* harmony export */ \"actionZoomOut\": () => (/* binding */ actionZoomOut),\n/* harmony export */ \"actionZoomToFit\": () => (/* binding */ actionZoomToFit),\n/* harmony export */ \"actionZoomToFitSelection\": () => (/* binding */ actionZoomToFitSelection),\n/* harmony export */ \"actionZoomToFitSelectionInViewport\": () => (/* binding */ actionZoomToFitSelectionInViewport),\n/* harmony export */ \"zoomToFit\": () => (/* binding */ zoomToFit),\n/* harmony export */ \"zoomToFitElements\": () => (/* binding */ zoomToFitElements)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _components_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/ColorPicker/ColorPicker */ \"../../components/ColorPicker/ColorPicker.tsx\");\n/* harmony import */ var _components_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/icons */ \"../../components/icons.tsx\");\n/* harmony import */ var _components_ToolButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/ToolButton */ \"../../components/ToolButton.tsx\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../keys */ \"../../keys.ts\");\n/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../scene */ \"../../scene/index.ts\");\n/* harmony import */ var _scene_scroll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../scene/scroll */ \"../../scene/scroll.ts\");\n/* harmony import */ var _scene_zoom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../scene/zoom */ \"../../scene/zoom.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _register__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./register */ \"../../actions/register.ts\");\n/* harmony import */ var _element_mutateElement__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../element/mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _appState__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../appState */ \"../../appState.ts\");\n/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../colors */ \"../../colors.ts\");\n/* harmony import */ var _scene_selection__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../scene/selection */ \"../../scene/selection.ts\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst actionChangeViewBackgroundColor = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"changeViewBackgroundColor\",\n trackEvent: false,\n predicate: (elements, appState, props, app) => {\n return !!app.props.UIOptions.canvasActions.changeViewBackgroundColor && !appState.viewModeEnabled;\n },\n perform: (_, appState, value) => {\n return {\n appState: Object.assign(Object.assign({}, appState), value),\n commitToHistory: !!value.viewBackgroundColor\n };\n },\n PanelComponent: ({\n elements,\n appState,\n updateData,\n appProps\n }) => {\n var _a, _b, _c, _d, _e; // FIXME move me to src/components/mainMenu/DefaultItems.tsx\n\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_1__.ColorPicker, {\n topPicks: //zsviczian\n (_c = (_b = (_a = appState.colorPalette) === null || _a === void 0 ? void 0 : _a.topPicks) === null || _b === void 0 ? void 0 : _b.canvasBackground) !== null && _c !== void 0 ? _c : _colors__WEBPACK_IMPORTED_MODULE_15__.DEFAULT_CANVAS_BACKGROUND_PICKS,\n palette: //zsviczian\n (_e = (_d = appState.colorPalette) === null || _d === void 0 ? void 0 : _d.canvasBackground) !== null && _e !== void 0 ? _e : _colors__WEBPACK_IMPORTED_MODULE_15__.DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"labels.canvasBackground\"),\n type: \"canvasBackground\",\n color: appState.viewBackgroundColor,\n onChange: color => updateData({\n viewBackgroundColor: color\n }),\n \"data-testid\": \"canvas-background-picker\",\n elements: elements,\n appState: appState,\n updateData: updateData\n });\n }\n});\nconst actionClearCanvas = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"clearCanvas\",\n trackEvent: {\n category: \"canvas\"\n },\n predicate: (elements, appState, props, app) => {\n return !!app.props.UIOptions.canvasActions.clearCanvas && !appState.viewModeEnabled;\n },\n perform: (elements, appState, _, app) => {\n app.imageCache.clear();\n return {\n elements: elements.map(element => (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_13__.newElementWith)(element, {\n isDeleted: true\n })),\n appState: Object.assign(Object.assign({}, (0,_appState__WEBPACK_IMPORTED_MODULE_14__.getDefaultAppState)()), {\n files: {},\n theme: appState.theme,\n penMode: appState.penMode,\n penDetected: appState.penDetected,\n exportBackground: appState.exportBackground,\n exportEmbedScene: appState.exportEmbedScene,\n gridSize: appState.gridSize,\n showStats: appState.showStats,\n pasteDialog: appState.pasteDialog,\n activeTool: appState.activeTool.type === \"image\" ? Object.assign(Object.assign({}, appState.activeTool), {\n type: \"selection\"\n }) : appState.activeTool,\n colorPalette: appState.colorPalette,\n trayModeEnabled: appState.trayModeEnabled,\n allowPinchZoom: appState.allowPinchZoom,\n allowWheelZoom: appState.allowWheelZoom,\n pinnedScripts: appState.pinnedScripts,\n customPens: appState.customPens\n }),\n commitToHistory: true\n };\n }\n});\nconst actionZoomIn = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"zoomIn\",\n viewMode: true,\n trackEvent: {\n category: \"canvas\"\n },\n perform: (_elements, appState, _, app) => {\n return {\n appState: Object.assign(Object.assign({}, appState), (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_10__.getStateForZoom)({\n viewportX: appState.width / 2 + appState.offsetLeft,\n viewportY: appState.height / 2 + appState.offsetTop,\n nextZoom: (0,_scene__WEBPACK_IMPORTED_MODULE_8__.getNormalizedZoom)(appState.zoom.value + _constants__WEBPACK_IMPORTED_MODULE_4__.ZOOM_STEP)\n }, appState)),\n commitToHistory: false\n };\n },\n PanelComponent: ({\n updateData\n }) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ToolButton__WEBPACK_IMPORTED_MODULE_3__.ToolButton, {\n type: \"button\",\n className: \"zoom-in-button zoom-button\",\n icon: _components_icons__WEBPACK_IMPORTED_MODULE_2__.ZoomInIcon,\n title: `${(0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.zoomIn\")} — ${(0,_utils__WEBPACK_IMPORTED_MODULE_11__.getShortcutKey)(\"CtrlOrCmd++\")}`,\n \"aria-label\": (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.zoomIn\"),\n onClick: () => {\n updateData(null);\n }\n }),\n keyTest: event => (event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.EQUAL || event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.NUM_ADD) && (event[_keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.CTRL_OR_CMD] || event.shiftKey)\n});\nconst actionZoomOut = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"zoomOut\",\n viewMode: true,\n trackEvent: {\n category: \"canvas\"\n },\n perform: (_elements, appState, _, app) => {\n return {\n appState: Object.assign(Object.assign({}, appState), (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_10__.getStateForZoom)({\n viewportX: appState.width / 2 + appState.offsetLeft,\n viewportY: appState.height / 2 + appState.offsetTop,\n nextZoom: (0,_scene__WEBPACK_IMPORTED_MODULE_8__.getNormalizedZoom)(appState.zoom.value - _constants__WEBPACK_IMPORTED_MODULE_4__.ZOOM_STEP)\n }, appState)),\n commitToHistory: false\n };\n },\n PanelComponent: ({\n updateData\n }) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ToolButton__WEBPACK_IMPORTED_MODULE_3__.ToolButton, {\n type: \"button\",\n className: \"zoom-out-button zoom-button\",\n icon: _components_icons__WEBPACK_IMPORTED_MODULE_2__.ZoomOutIcon,\n title: `${(0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.zoomOut\")} — ${(0,_utils__WEBPACK_IMPORTED_MODULE_11__.getShortcutKey)(\"CtrlOrCmd+-\")}`,\n \"aria-label\": (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.zoomOut\"),\n onClick: () => {\n updateData(null);\n }\n }),\n keyTest: event => (event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.MINUS || event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.NUM_SUBTRACT) && (event[_keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.CTRL_OR_CMD] || event.shiftKey)\n});\nconst actionResetZoom = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"resetZoom\",\n viewMode: true,\n trackEvent: {\n category: \"canvas\"\n },\n perform: (_elements, appState, _, app) => {\n return {\n appState: Object.assign(Object.assign({}, appState), (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_10__.getStateForZoom)({\n viewportX: appState.width / 2 + appState.offsetLeft,\n viewportY: appState.height / 2 + appState.offsetTop,\n nextZoom: (0,_scene__WEBPACK_IMPORTED_MODULE_8__.getNormalizedZoom)(1)\n }, appState)),\n commitToHistory: false\n };\n },\n PanelComponent: ({\n updateData,\n appState\n }) => // zsviczian <Tooltip label={t(\"buttons.resetZoom\")} style={{ display: \"none\" }}>\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components_ToolButton__WEBPACK_IMPORTED_MODULE_3__.ToolButton, Object.assign({\n type: \"button\",\n className: \"reset-zoom-button zoom-button\",\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.resetZoom\"),\n \"aria-label\": (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.resetZoom\"),\n onClick: () => {\n updateData(null);\n }\n }, {\n children: [(appState.zoom.value * 100).toFixed(0), \"%\"]\n })) //</Tooltip>\n ,\n keyTest: event => (event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.ZERO || event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.NUM_ZERO) && (event[_keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.CTRL_OR_CMD] || event.shiftKey)\n});\n\nconst zoomValueToFitBoundsOnViewport = (bounds, viewportDimensions, maxZoom = 1) => {\n const [x1, y1, x2, y2] = bounds;\n const commonBoundsWidth = x2 - x1;\n const zoomValueForWidth = viewportDimensions.width / commonBoundsWidth;\n const commonBoundsHeight = y2 - y1;\n const zoomValueForHeight = viewportDimensions.height / commonBoundsHeight;\n const smallestZoomValue = Math.min(zoomValueForWidth, zoomValueForHeight);\n const zoomAdjustedToSteps = Math.floor(smallestZoomValue / _constants__WEBPACK_IMPORTED_MODULE_4__.ZOOM_STEP) * _constants__WEBPACK_IMPORTED_MODULE_4__.ZOOM_STEP;\n const clampedZoomValueToFitElements = Math.min(Math.max(zoomAdjustedToSteps, _constants__WEBPACK_IMPORTED_MODULE_4__.MIN_ZOOM), maxZoom);\n return clampedZoomValueToFitElements;\n};\n\nconst zoomToFit = ({\n targetElements,\n appState,\n fitToViewport = false,\n viewportZoomFactor = 0.7\n}) => {\n const commonBounds = (0,_element__WEBPACK_IMPORTED_MODULE_5__.getCommonBounds)((0,_element__WEBPACK_IMPORTED_MODULE_5__.getNonDeletedElements)(targetElements));\n const [x1, y1, x2, y2] = commonBounds;\n const centerX = (x1 + x2) / 2;\n const centerY = (y1 + y2) / 2;\n let newZoomValue;\n let scrollX;\n let scrollY;\n\n if (fitToViewport) {\n const commonBoundsWidth = x2 - x1;\n const commonBoundsHeight = y2 - y1;\n newZoomValue = Math.min(appState.width / commonBoundsWidth, appState.height / commonBoundsHeight) * Math.min(1, Math.max(viewportZoomFactor, 0.1)); // Apply clamping to newZoomValue to be between 10% and 3000%\n\n newZoomValue = Math.min(Math.max(newZoomValue, 0.1), 30.0);\n scrollX = appState.width / 2 * (1 / newZoomValue) - centerX;\n scrollY = appState.height / 2 * (1 / newZoomValue) - centerY;\n } else {\n newZoomValue = zoomValueToFitBoundsOnViewport(commonBounds, {\n width: appState.width,\n height: appState.height\n });\n const centerScroll = (0,_scene_scroll__WEBPACK_IMPORTED_MODULE_9__.centerScrollOn)({\n scenePoint: {\n x: centerX,\n y: centerY\n },\n viewportDimensions: {\n width: appState.width,\n height: appState.height\n },\n zoom: {\n value: newZoomValue\n }\n });\n scrollX = centerScroll.scrollX;\n scrollY = centerScroll.scrollY;\n }\n\n return {\n appState: Object.assign(Object.assign({}, appState), {\n scrollX,\n scrollY,\n zoom: {\n value: newZoomValue\n }\n }),\n commitToHistory: false\n };\n}; // Note, this action differs from actionZoomToFitSelection in that it doesn't\n// zoom beyond 100%. In other words, if the content is smaller than viewport\n// size, it won't be zoomed in.\n\nconst actionZoomToFitSelectionInViewport = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"zoomToFitSelectionInViewport\",\n trackEvent: {\n category: \"canvas\"\n },\n perform: (elements, appState, _, app) => {\n const selectedElements = app.scene.getSelectedElements(appState);\n return zoomToFit({\n targetElements: selectedElements.length ? selectedElements : elements,\n appState,\n fitToViewport: false\n });\n },\n // NOTE shift-2 should have been assigned actionZoomToFitSelection.\n // TBD on how proceed\n keyTest: event => event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.TWO && event.shiftKey && !event.altKey && !event[_keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.CTRL_OR_CMD]\n});\nconst actionZoomToFitSelection = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"zoomToFitSelection\",\n trackEvent: {\n category: \"canvas\"\n },\n perform: (elements, appState, _, app) => {\n const selectedElements = app.scene.getSelectedElements(appState);\n return zoomToFit({\n targetElements: selectedElements.length ? selectedElements : elements,\n appState,\n fitToViewport: true\n });\n },\n // NOTE this action should use shift-2 per figma, alas\n keyTest: event => event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.THREE && event.shiftKey && !event.altKey && !event[_keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.CTRL_OR_CMD]\n});\nconst actionZoomToFit = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"zoomToFit\",\n viewMode: true,\n trackEvent: {\n category: \"canvas\"\n },\n perform: (elements, appState) => zoomToFit({\n targetElements: elements,\n appState,\n fitToViewport: false\n }),\n keyTest: event => event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.ONE && event.shiftKey && !event.altKey && !event[_keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.CTRL_OR_CMD]\n});\nconst actionToggleTheme = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"toggleTheme\",\n viewMode: true,\n trackEvent: {\n category: \"canvas\"\n },\n perform: (_, appState, value, app) => {\n //zsviczian\n if (app.props.onThemeChange) {\n //zsviczian\n app.props.onThemeChange(value || (appState.theme === _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.LIGHT ? _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.DARK : _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.LIGHT));\n }\n\n return {\n appState: Object.assign(Object.assign({}, appState), {\n theme: value || (appState.theme === _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.LIGHT ? _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.DARK : _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.LIGHT)\n }),\n commitToHistory: false\n };\n },\n keyTest: event => event.altKey && event.shiftKey && event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.D,\n predicate: (elements, appState, props, app) => {\n return !!app.props.UIOptions.canvasActions.toggleTheme;\n }\n});\nconst actionToggleEraserTool = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"toggleEraserTool\",\n trackEvent: {\n category: \"toolbar\"\n },\n perform: (elements, appState) => {\n let activeTool;\n\n if ((0,_appState__WEBPACK_IMPORTED_MODULE_14__.isEraserActive)(appState)) {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_11__.updateActiveTool)(appState, Object.assign(Object.assign({}, appState.activeTool.lastActiveTool || {\n type: \"selection\"\n }), {\n lastActiveToolBeforeEraser: null\n }));\n } else {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_11__.updateActiveTool)(appState, {\n type: \"eraser\",\n lastActiveToolBeforeEraser: appState.activeTool\n });\n }\n\n return {\n appState: Object.assign(Object.assign({}, appState), {\n selectedElementIds: {},\n selectedGroupIds: {},\n activeEmbeddable: null,\n activeTool\n }),\n commitToHistory: true\n };\n },\n keyTest: event => event.key === _keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.E\n});\nconst actionToggleHandTool = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"toggleHandTool\",\n trackEvent: {\n category: \"toolbar\"\n },\n perform: (elements, appState, _, app) => {\n let activeTool;\n\n if ((0,_appState__WEBPACK_IMPORTED_MODULE_14__.isHandToolActive)(appState)) {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_11__.updateActiveTool)(appState, Object.assign(Object.assign({}, appState.activeTool.lastActiveTool || {\n type: \"selection\"\n }), {\n lastActiveToolBeforeEraser: null\n }));\n } else {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_11__.updateActiveTool)(appState, {\n type: \"hand\",\n lastActiveToolBeforeEraser: appState.activeTool\n });\n (0,_utils__WEBPACK_IMPORTED_MODULE_11__.setCursor)(app.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_4__.CURSOR_TYPE.GRAB);\n }\n\n return {\n appState: Object.assign(Object.assign({}, appState), {\n selectedElementIds: {},\n selectedGroupIds: {},\n activeEmbeddable: null,\n activeTool\n }),\n commitToHistory: true\n };\n },\n keyTest: event => event.key === _keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.H\n}); //zsviczian\n\nconst zoomToFitElements = (elements, appState, zoomToSelection, app, //zsviczian\nmaxZoom = 1, //zsviczian\nmargin = 0) => {\n const nonDeletedElements = (0,_element__WEBPACK_IMPORTED_MODULE_5__.getNonDeletedElements)(elements);\n const selectedElements = app.scene.getSelectedElements(appState);\n const commonBounds = zoomToSelection && selectedElements.length > 0 ? (0,_element__WEBPACK_IMPORTED_MODULE_5__.getCommonBounds)((0,_scene_selection__WEBPACK_IMPORTED_MODULE_16__.excludeElementsInFramesFromSelection)(selectedElements)) : (0,_element__WEBPACK_IMPORTED_MODULE_5__.getCommonBounds)((0,_scene_selection__WEBPACK_IMPORTED_MODULE_16__.excludeElementsInFramesFromSelection)(nonDeletedElements));\n const newZoom = {\n value: zoomValueToFitBoundsOnViewport(commonBounds, {\n width: appState.width - appState.width * margin,\n height: appState.height - appState.height * margin\n }, maxZoom)\n };\n const [x1, y1, x2, y2] = commonBounds;\n const centerX = (x1 + x2) / 2;\n const centerY = (y1 + y2) / 2;\n return {\n appState: Object.assign(Object.assign(Object.assign({}, appState), (0,_scene_scroll__WEBPACK_IMPORTED_MODULE_9__.centerScrollOn)({\n scenePoint: {\n x: centerX,\n y: centerY\n },\n viewportDimensions: {\n width: appState.width,\n height: appState.height\n },\n zoom: newZoom\n })), {\n zoom: newZoom\n }),\n commitToHistory: false\n };\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../actions/actionCanvas.tsx?");
1877
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"actionChangeViewBackgroundColor\": () => (/* binding */ actionChangeViewBackgroundColor),\n/* harmony export */ \"actionClearCanvas\": () => (/* binding */ actionClearCanvas),\n/* harmony export */ \"actionResetZoom\": () => (/* binding */ actionResetZoom),\n/* harmony export */ \"actionToggleEraserTool\": () => (/* binding */ actionToggleEraserTool),\n/* harmony export */ \"actionToggleHandTool\": () => (/* binding */ actionToggleHandTool),\n/* harmony export */ \"actionToggleLaserPointer\": () => (/* binding */ actionToggleLaserPointer),\n/* harmony export */ \"actionToggleTheme\": () => (/* binding */ actionToggleTheme),\n/* harmony export */ \"actionZoomIn\": () => (/* binding */ actionZoomIn),\n/* harmony export */ \"actionZoomOut\": () => (/* binding */ actionZoomOut),\n/* harmony export */ \"actionZoomToFit\": () => (/* binding */ actionZoomToFit),\n/* harmony export */ \"actionZoomToFitSelection\": () => (/* binding */ actionZoomToFitSelection),\n/* harmony export */ \"actionZoomToFitSelectionInViewport\": () => (/* binding */ actionZoomToFitSelectionInViewport),\n/* harmony export */ \"zoomToFit\": () => (/* binding */ zoomToFit),\n/* harmony export */ \"zoomToFitElements\": () => (/* binding */ zoomToFitElements)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _components_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/ColorPicker/ColorPicker */ \"../../components/ColorPicker/ColorPicker.tsx\");\n/* harmony import */ var _components_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/icons */ \"../../components/icons.tsx\");\n/* harmony import */ var _components_ToolButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/ToolButton */ \"../../components/ToolButton.tsx\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../keys */ \"../../keys.ts\");\n/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../scene */ \"../../scene/index.ts\");\n/* harmony import */ var _scene_scroll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../scene/scroll */ \"../../scene/scroll.ts\");\n/* harmony import */ var _scene_zoom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../scene/zoom */ \"../../scene/zoom.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _register__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./register */ \"../../actions/register.ts\");\n/* harmony import */ var _element_mutateElement__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../element/mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _appState__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../appState */ \"../../appState.ts\");\n/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../colors */ \"../../colors.ts\");\n/* harmony import */ var _scene_selection__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../scene/selection */ \"../../scene/selection.ts\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst actionChangeViewBackgroundColor = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"changeViewBackgroundColor\",\n trackEvent: false,\n predicate: (elements, appState, props, app) => {\n return !!app.props.UIOptions.canvasActions.changeViewBackgroundColor && !appState.viewModeEnabled;\n },\n perform: (_, appState, value) => {\n return {\n appState: Object.assign(Object.assign({}, appState), value),\n commitToHistory: !!value.viewBackgroundColor\n };\n },\n PanelComponent: ({\n elements,\n appState,\n updateData,\n appProps\n }) => {\n var _a, _b, _c, _d, _e; // FIXME move me to src/components/mainMenu/DefaultItems.tsx\n\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ColorPicker_ColorPicker__WEBPACK_IMPORTED_MODULE_1__.ColorPicker, {\n topPicks: //zsviczian\n (_c = (_b = (_a = appState.colorPalette) === null || _a === void 0 ? void 0 : _a.topPicks) === null || _b === void 0 ? void 0 : _b.canvasBackground) !== null && _c !== void 0 ? _c : _colors__WEBPACK_IMPORTED_MODULE_15__.DEFAULT_CANVAS_BACKGROUND_PICKS,\n palette: //zsviczian\n (_e = (_d = appState.colorPalette) === null || _d === void 0 ? void 0 : _d.canvasBackground) !== null && _e !== void 0 ? _e : _colors__WEBPACK_IMPORTED_MODULE_15__.DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"labels.canvasBackground\"),\n type: \"canvasBackground\",\n color: appState.viewBackgroundColor,\n onChange: color => updateData({\n viewBackgroundColor: color\n }),\n \"data-testid\": \"canvas-background-picker\",\n elements: elements,\n appState: appState,\n updateData: updateData\n });\n }\n});\nconst actionClearCanvas = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"clearCanvas\",\n trackEvent: {\n category: \"canvas\"\n },\n predicate: (elements, appState, props, app) => {\n return !!app.props.UIOptions.canvasActions.clearCanvas && !appState.viewModeEnabled;\n },\n perform: (elements, appState, _, app) => {\n app.imageCache.clear();\n return {\n elements: elements.map(element => (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_13__.newElementWith)(element, {\n isDeleted: true\n })),\n appState: Object.assign(Object.assign({}, (0,_appState__WEBPACK_IMPORTED_MODULE_14__.getDefaultAppState)()), {\n files: {},\n theme: appState.theme,\n penMode: appState.penMode,\n penDetected: appState.penDetected,\n exportBackground: appState.exportBackground,\n exportEmbedScene: appState.exportEmbedScene,\n gridSize: appState.gridSize,\n showStats: appState.showStats,\n pasteDialog: appState.pasteDialog,\n activeTool: appState.activeTool.type === \"image\" ? Object.assign(Object.assign({}, appState.activeTool), {\n type: \"selection\"\n }) : appState.activeTool,\n colorPalette: appState.colorPalette,\n trayModeEnabled: appState.trayModeEnabled,\n allowPinchZoom: appState.allowPinchZoom,\n allowWheelZoom: appState.allowWheelZoom,\n pinnedScripts: appState.pinnedScripts,\n customPens: appState.customPens\n }),\n commitToHistory: true\n };\n }\n});\nconst actionZoomIn = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"zoomIn\",\n viewMode: true,\n trackEvent: {\n category: \"canvas\"\n },\n perform: (_elements, appState, _, app) => {\n return {\n appState: Object.assign(Object.assign({}, appState), (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_10__.getStateForZoom)({\n viewportX: appState.width / 2 + appState.offsetLeft,\n viewportY: appState.height / 2 + appState.offsetTop,\n nextZoom: (0,_scene__WEBPACK_IMPORTED_MODULE_8__.getNormalizedZoom)(appState.zoom.value + _constants__WEBPACK_IMPORTED_MODULE_4__.ZOOM_STEP)\n }, appState)),\n commitToHistory: false\n };\n },\n PanelComponent: ({\n updateData\n }) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ToolButton__WEBPACK_IMPORTED_MODULE_3__.ToolButton, {\n type: \"button\",\n className: \"zoom-in-button zoom-button\",\n icon: _components_icons__WEBPACK_IMPORTED_MODULE_2__.ZoomInIcon,\n title: `${(0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.zoomIn\")} — ${(0,_utils__WEBPACK_IMPORTED_MODULE_11__.getShortcutKey)(\"CtrlOrCmd++\")}`,\n \"aria-label\": (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.zoomIn\"),\n onClick: () => {\n updateData(null);\n }\n }),\n keyTest: event => (event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.EQUAL || event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.NUM_ADD) && (event[_keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.CTRL_OR_CMD] || event.shiftKey)\n});\nconst actionZoomOut = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"zoomOut\",\n viewMode: true,\n trackEvent: {\n category: \"canvas\"\n },\n perform: (_elements, appState, _, app) => {\n return {\n appState: Object.assign(Object.assign({}, appState), (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_10__.getStateForZoom)({\n viewportX: appState.width / 2 + appState.offsetLeft,\n viewportY: appState.height / 2 + appState.offsetTop,\n nextZoom: (0,_scene__WEBPACK_IMPORTED_MODULE_8__.getNormalizedZoom)(appState.zoom.value - _constants__WEBPACK_IMPORTED_MODULE_4__.ZOOM_STEP)\n }, appState)),\n commitToHistory: false\n };\n },\n PanelComponent: ({\n updateData\n }) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ToolButton__WEBPACK_IMPORTED_MODULE_3__.ToolButton, {\n type: \"button\",\n className: \"zoom-out-button zoom-button\",\n icon: _components_icons__WEBPACK_IMPORTED_MODULE_2__.ZoomOutIcon,\n title: `${(0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.zoomOut\")} — ${(0,_utils__WEBPACK_IMPORTED_MODULE_11__.getShortcutKey)(\"CtrlOrCmd+-\")}`,\n \"aria-label\": (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.zoomOut\"),\n onClick: () => {\n updateData(null);\n }\n }),\n keyTest: event => (event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.MINUS || event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.NUM_SUBTRACT) && (event[_keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.CTRL_OR_CMD] || event.shiftKey)\n});\nconst actionResetZoom = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"resetZoom\",\n viewMode: true,\n trackEvent: {\n category: \"canvas\"\n },\n perform: (_elements, appState, _, app) => {\n return {\n appState: Object.assign(Object.assign({}, appState), (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_10__.getStateForZoom)({\n viewportX: appState.width / 2 + appState.offsetLeft,\n viewportY: appState.height / 2 + appState.offsetTop,\n nextZoom: (0,_scene__WEBPACK_IMPORTED_MODULE_8__.getNormalizedZoom)(1)\n }, appState)),\n commitToHistory: false\n };\n },\n PanelComponent: ({\n updateData,\n appState\n }) => // zsviczian <Tooltip label={t(\"buttons.resetZoom\")} style={{ display: \"none\" }}>\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components_ToolButton__WEBPACK_IMPORTED_MODULE_3__.ToolButton, Object.assign({\n type: \"button\",\n className: \"reset-zoom-button zoom-button\",\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.resetZoom\"),\n \"aria-label\": (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.resetZoom\"),\n onClick: () => {\n updateData(null);\n }\n }, {\n children: [(appState.zoom.value * 100).toFixed(0), \"%\"]\n })) //</Tooltip>\n ,\n keyTest: event => (event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.ZERO || event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.NUM_ZERO) && (event[_keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.CTRL_OR_CMD] || event.shiftKey)\n});\n\nconst zoomValueToFitBoundsOnViewport = (bounds, viewportDimensions, maxZoom = 1) => {\n const [x1, y1, x2, y2] = bounds;\n const commonBoundsWidth = x2 - x1;\n const zoomValueForWidth = viewportDimensions.width / commonBoundsWidth;\n const commonBoundsHeight = y2 - y1;\n const zoomValueForHeight = viewportDimensions.height / commonBoundsHeight;\n const smallestZoomValue = Math.min(zoomValueForWidth, zoomValueForHeight);\n const zoomAdjustedToSteps = Math.floor(smallestZoomValue / _constants__WEBPACK_IMPORTED_MODULE_4__.ZOOM_STEP) * _constants__WEBPACK_IMPORTED_MODULE_4__.ZOOM_STEP;\n const clampedZoomValueToFitElements = Math.min(Math.max(zoomAdjustedToSteps, _constants__WEBPACK_IMPORTED_MODULE_4__.MIN_ZOOM), maxZoom);\n return clampedZoomValueToFitElements;\n};\n\nconst zoomToFit = ({\n targetElements,\n appState,\n fitToViewport = false,\n viewportZoomFactor = 0.7\n}) => {\n const commonBounds = (0,_element__WEBPACK_IMPORTED_MODULE_5__.getCommonBounds)((0,_element__WEBPACK_IMPORTED_MODULE_5__.getNonDeletedElements)(targetElements));\n const [x1, y1, x2, y2] = commonBounds;\n const centerX = (x1 + x2) / 2;\n const centerY = (y1 + y2) / 2;\n let newZoomValue;\n let scrollX;\n let scrollY;\n\n if (fitToViewport) {\n const commonBoundsWidth = x2 - x1;\n const commonBoundsHeight = y2 - y1;\n newZoomValue = Math.min(appState.width / commonBoundsWidth, appState.height / commonBoundsHeight) * Math.min(1, Math.max(viewportZoomFactor, 0.1)); // Apply clamping to newZoomValue to be between 10% and 3000%\n\n newZoomValue = Math.min(Math.max(newZoomValue, 0.1), 30.0);\n scrollX = appState.width / 2 * (1 / newZoomValue) - centerX;\n scrollY = appState.height / 2 * (1 / newZoomValue) - centerY;\n } else {\n newZoomValue = zoomValueToFitBoundsOnViewport(commonBounds, {\n width: appState.width,\n height: appState.height\n });\n const centerScroll = (0,_scene_scroll__WEBPACK_IMPORTED_MODULE_9__.centerScrollOn)({\n scenePoint: {\n x: centerX,\n y: centerY\n },\n viewportDimensions: {\n width: appState.width,\n height: appState.height\n },\n zoom: {\n value: newZoomValue\n }\n });\n scrollX = centerScroll.scrollX;\n scrollY = centerScroll.scrollY;\n }\n\n return {\n appState: Object.assign(Object.assign({}, appState), {\n scrollX,\n scrollY,\n zoom: {\n value: newZoomValue\n }\n }),\n commitToHistory: false\n };\n}; // Note, this action differs from actionZoomToFitSelection in that it doesn't\n// zoom beyond 100%. In other words, if the content is smaller than viewport\n// size, it won't be zoomed in.\n\nconst actionZoomToFitSelectionInViewport = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"zoomToFitSelectionInViewport\",\n trackEvent: {\n category: \"canvas\"\n },\n perform: (elements, appState, _, app) => {\n const selectedElements = app.scene.getSelectedElements(appState);\n return zoomToFit({\n targetElements: selectedElements.length ? selectedElements : elements,\n appState,\n fitToViewport: false\n });\n },\n // NOTE shift-2 should have been assigned actionZoomToFitSelection.\n // TBD on how proceed\n keyTest: event => event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.TWO && event.shiftKey && !event.altKey && !event[_keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.CTRL_OR_CMD]\n});\nconst actionZoomToFitSelection = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"zoomToFitSelection\",\n trackEvent: {\n category: \"canvas\"\n },\n perform: (elements, appState, _, app) => {\n const selectedElements = app.scene.getSelectedElements(appState);\n return zoomToFit({\n targetElements: selectedElements.length ? selectedElements : elements,\n appState,\n fitToViewport: true\n });\n },\n // NOTE this action should use shift-2 per figma, alas\n keyTest: event => event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.THREE && event.shiftKey && !event.altKey && !event[_keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.CTRL_OR_CMD]\n});\nconst actionZoomToFit = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"zoomToFit\",\n viewMode: true,\n trackEvent: {\n category: \"canvas\"\n },\n perform: (elements, appState) => zoomToFit({\n targetElements: elements,\n appState,\n fitToViewport: false\n }),\n keyTest: event => event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.ONE && event.shiftKey && !event.altKey && !event[_keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.CTRL_OR_CMD]\n});\nconst actionToggleTheme = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"toggleTheme\",\n viewMode: true,\n trackEvent: {\n category: \"canvas\"\n },\n perform: (_, appState, value, app) => {\n //zsviczian\n if (app.props.onThemeChange) {\n //zsviczian\n app.props.onThemeChange(value || (appState.theme === _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.LIGHT ? _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.DARK : _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.LIGHT));\n }\n\n return {\n appState: Object.assign(Object.assign({}, appState), {\n theme: value || (appState.theme === _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.LIGHT ? _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.DARK : _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.LIGHT)\n }),\n commitToHistory: false\n };\n },\n keyTest: event => event.altKey && event.shiftKey && event.code === _keys__WEBPACK_IMPORTED_MODULE_7__.CODES.D,\n predicate: (elements, appState, props, app) => {\n return !!app.props.UIOptions.canvasActions.toggleTheme;\n }\n});\nconst actionToggleEraserTool = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"toggleEraserTool\",\n trackEvent: {\n category: \"toolbar\"\n },\n perform: (elements, appState) => {\n let activeTool;\n\n if ((0,_appState__WEBPACK_IMPORTED_MODULE_14__.isEraserActive)(appState)) {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_11__.updateActiveTool)(appState, Object.assign(Object.assign({}, appState.activeTool.lastActiveTool || {\n type: \"selection\"\n }), {\n lastActiveToolBeforeEraser: null\n }));\n } else {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_11__.updateActiveTool)(appState, {\n type: \"eraser\",\n lastActiveToolBeforeEraser: appState.activeTool\n });\n }\n\n return {\n appState: Object.assign(Object.assign({}, appState), {\n selectedElementIds: {},\n selectedGroupIds: {},\n activeEmbeddable: null,\n activeTool\n }),\n commitToHistory: true\n };\n },\n keyTest: event => event.key === _keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.E\n});\nconst actionToggleHandTool = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"toggleHandTool\",\n trackEvent: {\n category: \"toolbar\"\n },\n perform: (elements, appState, _, app) => {\n let activeTool;\n\n if ((0,_appState__WEBPACK_IMPORTED_MODULE_14__.isHandToolActive)(appState)) {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_11__.updateActiveTool)(appState, Object.assign(Object.assign({}, appState.activeTool.lastActiveTool || {\n type: \"selection\"\n }), {\n lastActiveToolBeforeEraser: null\n }));\n } else {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_11__.updateActiveTool)(appState, {\n type: \"hand\",\n lastActiveToolBeforeEraser: appState.activeTool\n });\n (0,_utils__WEBPACK_IMPORTED_MODULE_11__.setCursor)(app.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_4__.CURSOR_TYPE.GRAB);\n }\n\n return {\n appState: Object.assign(Object.assign({}, appState), {\n selectedElementIds: {},\n selectedGroupIds: {},\n activeEmbeddable: null,\n activeTool\n }),\n commitToHistory: true\n };\n },\n keyTest: event => event.key === _keys__WEBPACK_IMPORTED_MODULE_7__.KEYS.H\n});\nconst actionToggleLaserPointer = (0,_register__WEBPACK_IMPORTED_MODULE_12__.register)({\n name: \"toggleLaserPointerTool\",\n viewMode: true,\n trackEvent: {\n category: \"menu\"\n },\n\n perform(elements, appState, _, app) {\n let activeTool;\n\n if ((0,_appState__WEBPACK_IMPORTED_MODULE_14__.isLaserPointerActive)(appState)) {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_11__.updateActiveTool)(appState, Object.assign(Object.assign({}, appState.activeTool.lastActiveTool || {\n type: appState.viewModeEnabled ? \"hand\" : \"selection\"\n }), {\n lastActiveToolBeforeEraser: null\n }));\n (0,_utils__WEBPACK_IMPORTED_MODULE_11__.setCursor)(app.interactiveCanvas, appState.viewModeEnabled ? _constants__WEBPACK_IMPORTED_MODULE_4__.CURSOR_TYPE.GRAB : _constants__WEBPACK_IMPORTED_MODULE_4__.CURSOR_TYPE.POINTER);\n } else {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_11__.updateActiveTool)(appState, {\n type: \"laser\",\n lastActiveToolBeforeEraser: appState.activeTool\n });\n (0,_utils__WEBPACK_IMPORTED_MODULE_11__.setCursor)(app.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_4__.CURSOR_TYPE.CROSSHAIR);\n }\n\n return {\n appState: Object.assign(Object.assign({}, appState), {\n selectedElementIds: {},\n selectedGroupIds: {},\n activeEmbeddable: null,\n activeTool\n }),\n commitToHistory: true\n };\n },\n\n checked: appState => appState.activeTool.type === \"laser\",\n contextItemLabel: \"labels.laser\"\n}); //zsviczian\n\nconst zoomToFitElements = (elements, appState, zoomToSelection, app, //zsviczian\nmaxZoom = 1, //zsviczian\nmargin = 0) => {\n const nonDeletedElements = (0,_element__WEBPACK_IMPORTED_MODULE_5__.getNonDeletedElements)(elements);\n const selectedElements = app.scene.getSelectedElements(appState);\n const commonBounds = zoomToSelection && selectedElements.length > 0 ? (0,_element__WEBPACK_IMPORTED_MODULE_5__.getCommonBounds)((0,_scene_selection__WEBPACK_IMPORTED_MODULE_16__.excludeElementsInFramesFromSelection)(selectedElements)) : (0,_element__WEBPACK_IMPORTED_MODULE_5__.getCommonBounds)((0,_scene_selection__WEBPACK_IMPORTED_MODULE_16__.excludeElementsInFramesFromSelection)(nonDeletedElements));\n const newZoom = {\n value: zoomValueToFitBoundsOnViewport(commonBounds, {\n width: appState.width - appState.width * margin,\n height: appState.height - appState.height * margin\n }, maxZoom)\n };\n const [x1, y1, x2, y2] = commonBounds;\n const centerX = (x1 + x2) / 2;\n const centerY = (y1 + y2) / 2;\n return {\n appState: Object.assign(Object.assign(Object.assign({}, appState), (0,_scene_scroll__WEBPACK_IMPORTED_MODULE_9__.centerScrollOn)({\n scenePoint: {\n x: centerX,\n y: centerY\n },\n viewportDimensions: {\n width: appState.width,\n height: appState.height\n },\n zoom: newZoom\n })), {\n zoom: newZoom\n }),\n commitToHistory: false\n };\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../actions/actionCanvas.tsx?");
1856
1878
 
1857
1879
  /***/ }),
1858
1880
 
@@ -1929,7 +1951,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
1929
1951
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1930
1952
 
1931
1953
  "use strict";
1932
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"actionFinalize\": () => (/* binding */ actionFinalize)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../keys */ \"../../keys.ts\");\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _components_ToolButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../components/ToolButton */ \"../../components/ToolButton.tsx\");\n/* harmony import */ var _components_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/icons */ \"../../components/icons.tsx\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _register__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./register */ \"../../actions/register.ts\");\n/* harmony import */ var _element_mutateElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../element/mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../math */ \"../../math.ts\");\n/* harmony import */ var _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../element/linearElementEditor */ \"../../element/linearElementEditor.ts\");\n/* harmony import */ var _scene_Scene__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../scene/Scene */ \"../../scene/Scene.ts\");\n/* harmony import */ var _element_binding__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../element/binding */ \"../../element/binding.ts\");\n/* harmony import */ var _element_typeChecks__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../element/typeChecks */ \"../../element/typeChecks.ts\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst actionFinalize = (0,_register__WEBPACK_IMPORTED_MODULE_7__.register)({\n name: \"finalize\",\n trackEvent: false,\n perform: (elements, appState, _, {\n interactiveCanvas,\n focusContainer,\n scene\n }) => {\n var _a;\n\n if (appState.editingLinearElement) {\n const {\n elementId,\n startBindingElement,\n endBindingElement\n } = appState.editingLinearElement;\n const element = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_10__.LinearElementEditor.getElement(elementId);\n\n if (element) {\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_13__.isBindingElement)(element)) {\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_12__.bindOrUnbindLinearElement)(element, startBindingElement, endBindingElement);\n }\n\n return {\n elements: element.points.length < 2 || (0,_element__WEBPACK_IMPORTED_MODULE_2__.isInvisiblySmallElement)(element) ? elements.filter(el => el.id !== element.id) : undefined,\n appState: Object.assign(Object.assign({}, appState), {\n cursorButton: \"up\",\n editingLinearElement: null\n }),\n commitToHistory: true\n };\n }\n }\n\n let newElements = elements;\n const pendingImageElement = appState.pendingImageElementId && scene.getElement(appState.pendingImageElementId);\n\n if (pendingImageElement) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_8__.mutateElement)(pendingImageElement, {\n isDeleted: true\n }, false);\n }\n\n if (window.document.activeElement instanceof HTMLElement) {\n focusContainer();\n }\n\n const multiPointElement = appState.multiElement ? appState.multiElement : ((_a = appState.editingElement) === null || _a === void 0 ? void 0 : _a.type) === \"freedraw\" ? appState.editingElement : null;\n\n if (multiPointElement) {\n // pen and mouse have hover\n if (multiPointElement.type !== \"freedraw\" && appState.lastPointerDownWith !== \"touch\") {\n const {\n points,\n lastCommittedPoint\n } = multiPointElement;\n\n if (!lastCommittedPoint || points[points.length - 1] !== lastCommittedPoint) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_8__.mutateElement)(multiPointElement, {\n points: multiPointElement.points.slice(0, -1)\n });\n }\n }\n\n if ((0,_element__WEBPACK_IMPORTED_MODULE_2__.isInvisiblySmallElement)(multiPointElement)) {\n newElements = newElements.slice(0, -1);\n } // If the multi point line closes the loop,\n // set the last point to first point.\n // This ensures that loop remains closed at different scales.\n\n\n const isLoop = (0,_math__WEBPACK_IMPORTED_MODULE_9__.isPathALoop)(multiPointElement.points, appState.zoom.value);\n\n if (multiPointElement.type === \"line\" || multiPointElement.type === \"freedraw\") {\n if (isLoop) {\n const linePoints = multiPointElement.points;\n const firstPoint = linePoints[0];\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_8__.mutateElement)(multiPointElement, {\n points: linePoints.map((point, index) => index === linePoints.length - 1 ? [firstPoint[0], firstPoint[1]] : point)\n });\n }\n }\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_13__.isBindingElement)(multiPointElement) && !isLoop && multiPointElement.points.length > 1) {\n const [x, y] = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_10__.LinearElementEditor.getPointAtIndexGlobalCoordinates(multiPointElement, -1);\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_12__.maybeBindLinearElement)(multiPointElement, appState, _scene_Scene__WEBPACK_IMPORTED_MODULE_11__[\"default\"].getScene(multiPointElement), {\n x,\n y\n });\n }\n }\n\n if (!appState.activeTool.locked && appState.activeTool.type !== \"freedraw\" || !multiPointElement) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_3__.resetCursor)(interactiveCanvas);\n }\n\n let activeTool;\n\n if (appState.activeTool.type === \"eraser\") {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.updateActiveTool)(appState, Object.assign(Object.assign({}, appState.activeTool.lastActiveTool || {\n type: \"selection\"\n }), {\n lastActiveToolBeforeEraser: null\n }));\n } else {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.updateActiveTool)(appState, {\n type: \"selection\"\n });\n }\n\n return {\n elements: newElements,\n appState: Object.assign(Object.assign({}, appState), {\n cursorButton: \"up\",\n activeTool: (appState.activeTool.locked || appState.activeTool.type === \"freedraw\") && multiPointElement ? appState.activeTool : activeTool,\n activeEmbeddable: null,\n draggingElement: null,\n multiElement: null,\n editingElement: null,\n startBoundElement: null,\n suggestedBindings: [],\n selectedElementIds: multiPointElement && !appState.activeTool.locked && appState.activeTool.type !== \"freedraw\" ? Object.assign(Object.assign({}, appState.selectedElementIds), {\n [multiPointElement.id]: true\n }) : appState.selectedElementIds,\n // To select the linear element when user has finished mutipoint editing\n selectedLinearElement: multiPointElement && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_13__.isLinearElement)(multiPointElement) ? new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_10__.LinearElementEditor(multiPointElement, scene) : appState.selectedLinearElement,\n pendingImageElementId: null\n }),\n commitToHistory: appState.activeTool.type === \"freedraw\"\n };\n },\n keyTest: (event, appState) => event.key === _keys__WEBPACK_IMPORTED_MODULE_1__.KEYS.ESCAPE && (appState.editingLinearElement !== null || !appState.draggingElement && appState.multiElement === null) || (event.key === _keys__WEBPACK_IMPORTED_MODULE_1__.KEYS.ESCAPE || event.key === _keys__WEBPACK_IMPORTED_MODULE_1__.KEYS.ENTER) && appState.multiElement !== null,\n PanelComponent: ({\n appState,\n updateData,\n data\n }) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ToolButton__WEBPACK_IMPORTED_MODULE_4__.ToolButton, {\n type: \"button\",\n icon: _components_icons__WEBPACK_IMPORTED_MODULE_5__.done,\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.done\"),\n \"aria-label\": (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.done\"),\n onClick: updateData,\n visible: appState.multiElement != null,\n size: (data === null || data === void 0 ? void 0 : data.size) || \"medium\"\n })\n});\n\n//# sourceURL=webpack://ExcalidrawLib/../../actions/actionFinalize.tsx?");
1954
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"actionFinalize\": () => (/* binding */ actionFinalize)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../keys */ \"../../keys.ts\");\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _components_ToolButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../components/ToolButton */ \"../../components/ToolButton.tsx\");\n/* harmony import */ var _components_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/icons */ \"../../components/icons.tsx\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _register__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./register */ \"../../actions/register.ts\");\n/* harmony import */ var _element_mutateElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../element/mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../math */ \"../../math.ts\");\n/* harmony import */ var _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../element/linearElementEditor */ \"../../element/linearElementEditor.ts\");\n/* harmony import */ var _scene_Scene__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../scene/Scene */ \"../../scene/Scene.ts\");\n/* harmony import */ var _element_binding__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../element/binding */ \"../../element/binding.ts\");\n/* harmony import */ var _element_typeChecks__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../element/typeChecks */ \"../../element/typeChecks.ts\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst actionFinalize = (0,_register__WEBPACK_IMPORTED_MODULE_7__.register)({\n name: \"finalize\",\n trackEvent: false,\n perform: (elements, appState, _, {\n interactiveCanvas,\n focusContainer,\n scene\n }) => {\n var _a;\n\n if (appState.editingLinearElement) {\n const {\n elementId,\n startBindingElement,\n endBindingElement\n } = appState.editingLinearElement;\n const element = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_10__.LinearElementEditor.getElement(elementId);\n\n if (element) {\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_13__.isBindingElement)(element)) {\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_12__.bindOrUnbindLinearElement)(element, startBindingElement, endBindingElement);\n }\n\n return {\n elements: element.points.length < 2 || (0,_element__WEBPACK_IMPORTED_MODULE_2__.isInvisiblySmallElement)(element) ? elements.filter(el => el.id !== element.id) : undefined,\n appState: Object.assign(Object.assign({}, appState), {\n cursorButton: \"up\",\n editingLinearElement: null\n }),\n commitToHistory: true\n };\n }\n }\n\n let newElements = elements;\n const pendingImageElement = appState.pendingImageElementId && scene.getElement(appState.pendingImageElementId);\n\n if (pendingImageElement) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_8__.mutateElement)(pendingImageElement, {\n isDeleted: true\n }, false);\n }\n\n if (window.document.activeElement instanceof HTMLElement) {\n focusContainer();\n }\n\n const multiPointElement = appState.multiElement ? appState.multiElement : ((_a = appState.editingElement) === null || _a === void 0 ? void 0 : _a.type) === \"freedraw\" ? appState.editingElement : null;\n\n if (multiPointElement) {\n // pen and mouse have hover\n if (multiPointElement.type !== \"freedraw\" && appState.lastPointerDownWith !== \"touch\") {\n const {\n points,\n lastCommittedPoint\n } = multiPointElement;\n\n if (!lastCommittedPoint || points[points.length - 1] !== lastCommittedPoint) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_8__.mutateElement)(multiPointElement, {\n points: multiPointElement.points.slice(0, -1)\n });\n }\n }\n\n if ((0,_element__WEBPACK_IMPORTED_MODULE_2__.isInvisiblySmallElement)(multiPointElement)) {\n newElements = newElements.filter(el => el.id !== multiPointElement.id);\n } // If the multi point line closes the loop,\n // set the last point to first point.\n // This ensures that loop remains closed at different scales.\n\n\n const isLoop = (0,_math__WEBPACK_IMPORTED_MODULE_9__.isPathALoop)(multiPointElement.points, appState.zoom.value);\n\n if (multiPointElement.type === \"line\" || multiPointElement.type === \"freedraw\") {\n if (isLoop) {\n const linePoints = multiPointElement.points;\n const firstPoint = linePoints[0];\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_8__.mutateElement)(multiPointElement, {\n points: linePoints.map((point, index) => index === linePoints.length - 1 ? [firstPoint[0], firstPoint[1]] : point)\n });\n }\n }\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_13__.isBindingElement)(multiPointElement) && !isLoop && multiPointElement.points.length > 1) {\n const [x, y] = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_10__.LinearElementEditor.getPointAtIndexGlobalCoordinates(multiPointElement, -1);\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_12__.maybeBindLinearElement)(multiPointElement, appState, _scene_Scene__WEBPACK_IMPORTED_MODULE_11__[\"default\"].getScene(multiPointElement), {\n x,\n y\n });\n }\n }\n\n if (!appState.activeTool.locked && appState.activeTool.type !== \"freedraw\" || !multiPointElement) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_3__.resetCursor)(interactiveCanvas);\n }\n\n let activeTool;\n\n if (appState.activeTool.type === \"eraser\") {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.updateActiveTool)(appState, Object.assign(Object.assign({}, appState.activeTool.lastActiveTool || {\n type: \"selection\"\n }), {\n lastActiveToolBeforeEraser: null\n }));\n } else {\n activeTool = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.updateActiveTool)(appState, {\n type: \"selection\"\n });\n }\n\n return {\n elements: newElements,\n appState: Object.assign(Object.assign({}, appState), {\n cursorButton: \"up\",\n activeTool: (appState.activeTool.locked || appState.activeTool.type === \"freedraw\") && multiPointElement ? appState.activeTool : activeTool,\n activeEmbeddable: null,\n draggingElement: null,\n multiElement: null,\n editingElement: null,\n startBoundElement: null,\n suggestedBindings: [],\n selectedElementIds: multiPointElement && !appState.activeTool.locked && appState.activeTool.type !== \"freedraw\" ? Object.assign(Object.assign({}, appState.selectedElementIds), {\n [multiPointElement.id]: true\n }) : appState.selectedElementIds,\n // To select the linear element when user has finished mutipoint editing\n selectedLinearElement: multiPointElement && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_13__.isLinearElement)(multiPointElement) ? new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_10__.LinearElementEditor(multiPointElement, scene) : appState.selectedLinearElement,\n pendingImageElementId: null\n }),\n commitToHistory: appState.activeTool.type === \"freedraw\"\n };\n },\n keyTest: (event, appState) => event.key === _keys__WEBPACK_IMPORTED_MODULE_1__.KEYS.ESCAPE && (appState.editingLinearElement !== null || !appState.draggingElement && appState.multiElement === null) || (event.key === _keys__WEBPACK_IMPORTED_MODULE_1__.KEYS.ESCAPE || event.key === _keys__WEBPACK_IMPORTED_MODULE_1__.KEYS.ENTER) && appState.multiElement !== null,\n PanelComponent: ({\n appState,\n updateData,\n data\n }) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_ToolButton__WEBPACK_IMPORTED_MODULE_4__.ToolButton, {\n type: \"button\",\n icon: _components_icons__WEBPACK_IMPORTED_MODULE_5__.done,\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.done\"),\n \"aria-label\": (0,_i18n__WEBPACK_IMPORTED_MODULE_6__.t)(\"buttons.done\"),\n onClick: updateData,\n visible: appState.multiElement != null,\n size: (data === null || data === void 0 ? void 0 : data.size) || \"medium\"\n })\n});\n\n//# sourceURL=webpack://ExcalidrawLib/../../actions/actionFinalize.tsx?");
1933
1955
 
1934
1956
  /***/ }),
1935
1957
 
@@ -2149,7 +2171,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
2149
2171
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2150
2172
 
2151
2173
  "use strict";
2152
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getShortcutFromShortcutName\": () => (/* binding */ getShortcutFromShortcutName)\n/* harmony export */ });\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n\n\n\nconst shortcutMap = {\n toggleTheme: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Shift+Alt+D\")],\n saveScene: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+S\")],\n loadScene: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+O\")],\n clearCanvas: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Delete\")],\n imageExport: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Shift+E\")],\n cut: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+X\")],\n copy: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+C\")],\n paste: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+V\")],\n copyStyles: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Alt+C\")],\n pasteStyles: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Alt+V\")],\n selectAll: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+A\")],\n deleteSelectedElements: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Delete\")],\n duplicateSelection: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+D\"), (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(`Alt+${(0,_i18n__WEBPACK_IMPORTED_MODULE_1__.t)(\"helpDialog.drag\")}`)],\n sendBackward: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+[\")],\n bringForward: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+]\")],\n sendToBack: [_constants__WEBPACK_IMPORTED_MODULE_0__.isDarwin ? (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Alt+[\") : (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Shift+[\")],\n bringToFront: [_constants__WEBPACK_IMPORTED_MODULE_0__.isDarwin ? (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Alt+]\") : (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Shift+]\")],\n copyAsPng: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Shift+Alt+C\")],\n copyAsSvg: [],\n group: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+G\")],\n ungroup: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Shift+G\")],\n gridMode: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+'\")],\n zenMode: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Alt+Z\")],\n objectsSnapMode: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Alt+S\")],\n stats: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Alt+/\")],\n addToLibrary: [],\n flipHorizontal: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Shift+H\")],\n flipVertical: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Shift+V\")],\n viewMode: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Alt+R\")],\n hyperlink: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+K\")],\n toggleElementLock: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Shift+L\")]\n};\nconst getShortcutFromShortcutName = name => {\n const shortcuts = shortcutMap[name]; // if multiple shortcuts available, take the first one\n\n return shortcuts && shortcuts.length > 0 ? shortcuts[0] : \"\";\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../actions/shortcuts.ts?");
2174
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getShortcutFromShortcutName\": () => (/* binding */ getShortcutFromShortcutName)\n/* harmony export */ });\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n\n\n\nconst shortcutMap = {\n toggleTheme: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Shift+Alt+D\")],\n saveScene: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+S\")],\n loadScene: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+O\")],\n clearCanvas: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Delete\")],\n imageExport: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Shift+E\")],\n cut: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+X\")],\n copy: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+C\")],\n paste: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+V\")],\n copyStyles: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Alt+C\")],\n pasteStyles: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Alt+V\")],\n selectAll: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+A\")],\n deleteSelectedElements: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Delete\")],\n duplicateSelection: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+D\"), (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(`Alt+${(0,_i18n__WEBPACK_IMPORTED_MODULE_1__.t)(\"helpDialog.drag\")}`)],\n sendBackward: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+[\")],\n bringForward: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+]\")],\n sendToBack: [_constants__WEBPACK_IMPORTED_MODULE_0__.isDarwin ? (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Alt+[\") : (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Shift+[\")],\n bringToFront: [_constants__WEBPACK_IMPORTED_MODULE_0__.isDarwin ? (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Alt+]\") : (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Shift+]\")],\n copyAsPng: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Shift+Alt+C\")],\n copyAsSvg: [],\n group: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+G\")],\n ungroup: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Shift+G\")],\n gridMode: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+'\")],\n zenMode: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Alt+Z\")],\n objectsSnapMode: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Alt+S\")],\n stats: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Alt+/\")],\n addToLibrary: [],\n flipHorizontal: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Shift+H\")],\n flipVertical: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Shift+V\")],\n viewMode: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"Alt+R\")],\n hyperlink: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+K\")],\n toggleElementLock: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"CtrlOrCmd+Shift+L\")],\n toggleLaserPointerTool: [(0,_utils__WEBPACK_IMPORTED_MODULE_2__.getShortcutKey)(\"K\")]\n};\nconst getShortcutFromShortcutName = name => {\n const shortcuts = shortcutMap[name]; // if multiple shortcuts available, take the first one\n\n return shortcuts && shortcuts.length > 0 ? shortcuts[0] : \"\";\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../actions/shortcuts.ts?");
2153
2175
 
2154
2176
  /***/ }),
2155
2177
 
@@ -2171,7 +2193,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
2171
2193
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2172
2194
 
2173
2195
  "use strict";
2174
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"trackEvent\": () => (/* binding */ trackEvent)\n/* harmony export */ });\nconst trackEvent = (category, action, label, value) => {\n try {\n // place here categories that you want to track as events\n // KEEP IN MIND THE PRICING\n const ALLOWED_CATEGORIES_TO_TRACK = []; // Uncomment the next line to track locally\n // console.log(\"Track Event\", { category, action, label, value });\n\n if (typeof window === \"undefined\" || ({\"VITE_APP_BACKEND_V2_GET_URL\":\"https://json-dev.excalidraw.com/api/v2/\",\"VITE_APP_BACKEND_V2_POST_URL\":\"https://json-dev.excalidraw.com/api/v2/post/\",\"VITE_APP_LIBRARY_URL\":\"https://libraries.excalidraw.com\",\"VITE_APP_LIBRARY_BACKEND\":\"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries\",\"VITE_APP_WS_SERVER_URL\":\"http://localhost:3002\",\"VITE_APP_PORTAL_URL\":\"\",\"VITE_APP_PLUS_LP\":\"https://plus.excalidraw.com\",\"VITE_APP_PLUS_APP\":\"https://app.excalidraw.com\",\"VITE_APP_FIREBASE_CONFIG\":\"{\\\"apiKey\\\":\\\"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8\\\",\\\"authDomain\\\":\\\"excalidraw-oss-dev.firebaseapp.com\\\",\\\"projectId\\\":\\\"excalidraw-oss-dev\\\",\\\"storageBucket\\\":\\\"excalidraw-oss-dev.appspot.com\\\",\\\"messagingSenderId\\\":\\\"664559512677\\\",\\\"appId\\\":\\\"1:664559512677:web:a385181f2928d328a7aa8c\\\"}\",\"VITE_APP_DEV_ENABLE_SW\":\"\",\"VITE_APP_DEV_DISABLE_LIVE_RELOAD\":\"\",\"VITE_APP_DISABLE_TRACKING\":\"true\",\"FAST_REFRESH\":\"false\",\"VITE_APP_PORT\":\"3000\",\"VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX\":\"\",\"VITE_APP_COLLAPSE_OVERLAY\":\"true\",\"VITE_APP_ENABLE_ESLINT\":\"true\",\"VITE_PKG_NAME\":\"@zsviczian/excalidraw\",\"VITE_PKG_VERSION\":\"0.16.1-obsidian-1\",\"VITE_IS_EXCALIDRAW_NPM_PACKAGE\":true}).VITE_WORKER_ID) {\n return;\n }\n\n if (!ALLOWED_CATEGORIES_TO_TRACK.includes(category)) {\n return;\n }\n\n if (window.sa_event) {\n window.sa_event(action, {\n category,\n label,\n value\n });\n }\n } catch (error) {\n console.error(\"error during analytics\", error);\n }\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../analytics.ts?");
2196
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"trackEvent\": () => (/* binding */ trackEvent)\n/* harmony export */ });\nconst trackEvent = (category, action, label, value) => {\n try {\n // place here categories that you want to track as events\n // KEEP IN MIND THE PRICING\n const ALLOWED_CATEGORIES_TO_TRACK = []; // Uncomment the next line to track locally\n // console.log(\"Track Event\", { category, action, label, value });\n\n if (typeof window === \"undefined\" || ({\"VITE_APP_BACKEND_V2_GET_URL\":\"https://json-dev.excalidraw.com/api/v2/\",\"VITE_APP_BACKEND_V2_POST_URL\":\"https://json-dev.excalidraw.com/api/v2/post/\",\"VITE_APP_LIBRARY_URL\":\"https://libraries.excalidraw.com\",\"VITE_APP_LIBRARY_BACKEND\":\"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries\",\"VITE_APP_WS_SERVER_URL\":\"http://localhost:3002\",\"VITE_APP_PORTAL_URL\":\"\",\"VITE_APP_PLUS_LP\":\"https://plus.excalidraw.com\",\"VITE_APP_PLUS_APP\":\"https://app.excalidraw.com\",\"VITE_APP_FIREBASE_CONFIG\":\"{\\\"apiKey\\\":\\\"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8\\\",\\\"authDomain\\\":\\\"excalidraw-oss-dev.firebaseapp.com\\\",\\\"projectId\\\":\\\"excalidraw-oss-dev\\\",\\\"storageBucket\\\":\\\"excalidraw-oss-dev.appspot.com\\\",\\\"messagingSenderId\\\":\\\"664559512677\\\",\\\"appId\\\":\\\"1:664559512677:web:a385181f2928d328a7aa8c\\\"}\",\"VITE_APP_DEV_ENABLE_SW\":\"\",\"VITE_APP_DEV_DISABLE_LIVE_RELOAD\":\"\",\"VITE_APP_DISABLE_TRACKING\":\"true\",\"FAST_REFRESH\":\"false\",\"VITE_APP_PORT\":\"3000\",\"VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX\":\"\",\"VITE_APP_COLLAPSE_OVERLAY\":\"true\",\"VITE_APP_ENABLE_ESLINT\":\"true\",\"VITE_PKG_NAME\":\"@zsviczian/excalidraw\",\"VITE_PKG_VERSION\":\"0.16.1-obsidian-2\",\"VITE_IS_EXCALIDRAW_NPM_PACKAGE\":true}).VITE_WORKER_ID) {\n return;\n }\n\n if (!ALLOWED_CATEGORIES_TO_TRACK.includes(category)) {\n return;\n }\n\n if (window.sa_event) {\n window.sa_event(action, {\n category,\n label,\n value\n });\n }\n } catch (error) {\n console.error(\"error during analytics\", error);\n }\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../analytics.ts?");
2175
2197
 
2176
2198
  /***/ }),
2177
2199
 
@@ -2182,7 +2204,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
2182
2204
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2183
2205
 
2184
2206
  "use strict";
2185
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"cleanAppStateForExport\": () => (/* binding */ cleanAppStateForExport),\n/* harmony export */ \"clearAppStateForDatabase\": () => (/* binding */ clearAppStateForDatabase),\n/* harmony export */ \"clearAppStateForLocalStorage\": () => (/* binding */ clearAppStateForLocalStorage),\n/* harmony export */ \"getDefaultAppState\": () => (/* binding */ getDefaultAppState),\n/* harmony export */ \"isEraserActive\": () => (/* binding */ isEraserActive),\n/* harmony export */ \"isHandToolActive\": () => (/* binding */ isHandToolActive)\n/* harmony export */ });\n/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ \"../../colors.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ \"../../constants.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./i18n */ \"../../i18n.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"../../utils.ts\");\n\n\n\n\nconst defaultExportScale = 1; //zsviczian - iPad scaling issue on export\n\n/*EXPORT_SCALES.includes(devicePixelRatio)\r\n ? devicePixelRatio\r\n : 1;*/\n\nconst getDefaultAppState = () => {\n return {\n showWelcomeScreen: false,\n theme: _constants__WEBPACK_IMPORTED_MODULE_1__.THEME.LIGHT,\n collaborators: new Map(),\n currentChartType: \"bar\",\n currentItemBackgroundColor: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.backgroundColor,\n currentItemEndArrowhead: \"arrow\",\n currentItemFillStyle: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.fillStyle,\n currentItemFontFamily: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_FONT_FAMILY,\n currentItemFontSize: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_FONT_SIZE,\n currentItemOpacity: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.opacity,\n currentItemRoughness: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.roughness,\n currentItemStartArrowhead: null,\n currentItemStrokeColor: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.strokeColor,\n currentItemRoundness: \"round\",\n currentItemStrokeStyle: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.strokeStyle,\n currentItemStrokeWidth: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.strokeWidth,\n currentItemTextAlign: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_TEXT_ALIGN,\n cursorButton: \"up\",\n activeEmbeddable: null,\n draggingElement: null,\n editingElement: null,\n editingGroupId: null,\n editingLinearElement: null,\n activeTool: {\n type: \"selection\",\n customType: null,\n locked: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.locked,\n lastActiveTool: null\n },\n penMode: false,\n penDetected: false,\n errorMessage: null,\n exportBackground: true,\n exportScale: defaultExportScale,\n exportEmbedScene: false,\n exportWithDarkMode: false,\n fileHandle: null,\n gridSize: null,\n previousGridSize: null,\n isBindingEnabled: true,\n defaultSidebarDockedPreference: false,\n isLoading: false,\n isResizing: false,\n isRotating: false,\n lastPointerDownWith: \"mouse\",\n multiElement: null,\n name: `${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.untitled\")}-${(0,_utils__WEBPACK_IMPORTED_MODULE_3__.getDateTime)()}`,\n contextMenu: null,\n openMenu: null,\n openPopup: null,\n openSidebar: null,\n openDialog: null,\n pasteDialog: {\n shown: false,\n data: null\n },\n previousSelectedElementIds: {},\n resizingElement: null,\n scrolledOutside: false,\n scrollX: 0,\n scrollY: 0,\n selectedElementIds: {},\n selectedGroupIds: {},\n selectedElementsAreBeingDragged: false,\n selectionElement: null,\n shouldCacheIgnoreZoom: false,\n showStats: false,\n startBoundElement: null,\n suggestedBindings: [],\n frameRendering: {\n enabled: true,\n clip: true,\n name: true,\n outline: true\n },\n frameToHighlight: null,\n editingFrame: null,\n elementsToHighlight: null,\n toast: null,\n viewBackgroundColor: _colors__WEBPACK_IMPORTED_MODULE_0__.COLOR_PALETTE.white,\n zenModeEnabled: false,\n zoom: {\n value: 1\n },\n viewModeEnabled: false,\n pendingImageElementId: null,\n showHyperlinkPopup: false,\n linkOpacity: 1,\n trayModeEnabled: false,\n colorPalette: undefined,\n allowPinchZoom: false,\n allowWheelZoom: false,\n pinnedScripts: [],\n customPens: [],\n currentStrokeOptions: null,\n resetCustomPen: null,\n gridColor: {\n Bold: \"#cccccc\",\n Regular: \"#e5e5e5\"\n },\n dynamicStyle: \"\",\n invertBindingBehaviour: false,\n selectedLinearElement: null,\n snapLines: [],\n originSnapOffset: {\n x: 0,\n y: 0\n },\n objectsSnapModeEnabled: false\n };\n};\n/**\r\n * Config containing all AppState keys. Used to determine whether given state\r\n * prop should be stripped when exporting to given storage type.\r\n */\n\nconst APP_STATE_STORAGE_CONF = (config => config)({\n showWelcomeScreen: {\n browser: true,\n export: false,\n server: false\n },\n theme: {\n browser: true,\n export: false,\n server: false\n },\n collaborators: {\n browser: false,\n export: false,\n server: false\n },\n currentChartType: {\n browser: true,\n export: false,\n server: false\n },\n currentItemBackgroundColor: {\n browser: true,\n export: false,\n server: false\n },\n currentItemEndArrowhead: {\n browser: true,\n export: false,\n server: false\n },\n currentItemFillStyle: {\n browser: true,\n export: false,\n server: false\n },\n currentItemFontFamily: {\n browser: true,\n export: false,\n server: false\n },\n currentItemFontSize: {\n browser: true,\n export: false,\n server: false\n },\n currentItemRoundness: {\n browser: true,\n export: false,\n server: false\n },\n currentItemOpacity: {\n browser: true,\n export: false,\n server: false\n },\n currentItemRoughness: {\n browser: true,\n export: false,\n server: false\n },\n currentItemStartArrowhead: {\n browser: true,\n export: false,\n server: false\n },\n currentItemStrokeColor: {\n browser: true,\n export: false,\n server: false\n },\n currentItemStrokeStyle: {\n browser: true,\n export: false,\n server: false\n },\n currentItemStrokeWidth: {\n browser: true,\n export: false,\n server: false\n },\n currentItemTextAlign: {\n browser: true,\n export: false,\n server: false\n },\n cursorButton: {\n browser: true,\n export: false,\n server: false\n },\n activeEmbeddable: {\n browser: false,\n export: false,\n server: false\n },\n draggingElement: {\n browser: false,\n export: false,\n server: false\n },\n editingElement: {\n browser: false,\n export: false,\n server: false\n },\n editingGroupId: {\n browser: true,\n export: false,\n server: false\n },\n editingLinearElement: {\n browser: false,\n export: false,\n server: false\n },\n activeTool: {\n browser: true,\n export: false,\n server: false\n },\n penMode: {\n browser: true,\n export: false,\n server: false\n },\n penDetected: {\n browser: true,\n export: false,\n server: false\n },\n errorMessage: {\n browser: false,\n export: false,\n server: false\n },\n exportBackground: {\n browser: true,\n export: false,\n server: false\n },\n exportEmbedScene: {\n browser: true,\n export: false,\n server: false\n },\n exportScale: {\n browser: true,\n export: false,\n server: false\n },\n exportWithDarkMode: {\n browser: true,\n export: false,\n server: false\n },\n fileHandle: {\n browser: false,\n export: false,\n server: false\n },\n gridSize: {\n browser: true,\n export: true,\n server: true\n },\n previousGridSize: {\n browser: false,\n export: false,\n server: false\n },\n height: {\n browser: false,\n export: false,\n server: false\n },\n isBindingEnabled: {\n browser: false,\n export: false,\n server: false\n },\n defaultSidebarDockedPreference: {\n browser: true,\n export: false,\n server: false\n },\n isLoading: {\n browser: false,\n export: false,\n server: false\n },\n isResizing: {\n browser: false,\n export: false,\n server: false\n },\n isRotating: {\n browser: false,\n export: false,\n server: false\n },\n lastPointerDownWith: {\n browser: true,\n export: false,\n server: false\n },\n multiElement: {\n browser: false,\n export: false,\n server: false\n },\n name: {\n browser: true,\n export: false,\n server: false\n },\n offsetLeft: {\n browser: false,\n export: false,\n server: false\n },\n offsetTop: {\n browser: false,\n export: false,\n server: false\n },\n contextMenu: {\n browser: false,\n export: false,\n server: false\n },\n openMenu: {\n browser: true,\n export: false,\n server: false\n },\n openPopup: {\n browser: false,\n export: false,\n server: false\n },\n openSidebar: {\n browser: true,\n export: false,\n server: false\n },\n openDialog: {\n browser: false,\n export: false,\n server: false\n },\n pasteDialog: {\n browser: false,\n export: false,\n server: false\n },\n previousSelectedElementIds: {\n browser: true,\n export: false,\n server: false\n },\n resizingElement: {\n browser: false,\n export: false,\n server: false\n },\n scrolledOutside: {\n browser: true,\n export: false,\n server: false\n },\n scrollX: {\n browser: true,\n export: false,\n server: false\n },\n scrollY: {\n browser: true,\n export: false,\n server: false\n },\n selectedElementIds: {\n browser: true,\n export: false,\n server: false\n },\n selectedGroupIds: {\n browser: true,\n export: false,\n server: false\n },\n selectedElementsAreBeingDragged: {\n browser: false,\n export: false,\n server: false\n },\n selectionElement: {\n browser: false,\n export: false,\n server: false\n },\n shouldCacheIgnoreZoom: {\n browser: true,\n export: false,\n server: false\n },\n showStats: {\n browser: true,\n export: false,\n server: false\n },\n startBoundElement: {\n browser: false,\n export: false,\n server: false\n },\n suggestedBindings: {\n browser: false,\n export: false,\n server: false\n },\n frameRendering: {\n browser: false,\n export: false,\n server: false\n },\n frameToHighlight: {\n browser: false,\n export: false,\n server: false\n },\n editingFrame: {\n browser: false,\n export: false,\n server: false\n },\n elementsToHighlight: {\n browser: false,\n export: false,\n server: false\n },\n toast: {\n browser: false,\n export: false,\n server: false\n },\n viewBackgroundColor: {\n browser: true,\n export: true,\n server: true\n },\n width: {\n browser: false,\n export: false,\n server: false\n },\n zenModeEnabled: {\n browser: true,\n export: false,\n server: false\n },\n zoom: {\n browser: true,\n export: false,\n server: false\n },\n viewModeEnabled: {\n browser: false,\n export: false,\n server: false\n },\n pendingImageElementId: {\n browser: false,\n export: false,\n server: false\n },\n showHyperlinkPopup: {\n browser: false,\n export: false,\n server: false\n },\n linkOpacity: {\n browser: false,\n export: false,\n server: false\n },\n trayModeEnabled: {\n browser: false,\n export: false,\n server: false\n },\n colorPalette: {\n browser: false,\n export: false,\n server: false\n },\n allowPinchZoom: {\n browser: false,\n export: false,\n server: false\n },\n allowWheelZoom: {\n browser: false,\n export: false,\n server: false\n },\n pinnedScripts: {\n browser: false,\n export: false,\n server: false\n },\n customPens: {\n browser: false,\n export: false,\n server: false\n },\n currentStrokeOptions: {\n browser: false,\n export: false,\n server: false\n },\n resetCustomPen: {\n browser: false,\n export: false,\n server: false\n },\n gridColor: {\n browser: false,\n export: false,\n server: false\n },\n dynamicStyle: {\n browser: false,\n export: false,\n server: false\n },\n invertBindingBehaviour: {\n browser: false,\n export: false,\n server: false\n },\n selectedLinearElement: {\n browser: true,\n export: false,\n server: false\n },\n snapLines: {\n browser: false,\n export: false,\n server: false\n },\n originSnapOffset: {\n browser: false,\n export: false,\n server: false\n },\n objectsSnapModeEnabled: {\n browser: true,\n export: false,\n server: false\n }\n});\n\nconst _clearAppStateForStorage = (appState, exportType) => {\n const stateForExport = {};\n\n for (const key of Object.keys(appState)) {\n const propConfig = APP_STATE_STORAGE_CONF[key];\n\n if (propConfig === null || propConfig === void 0 ? void 0 : propConfig[exportType]) {\n const nextValue = appState[key]; // https://github.com/microsoft/TypeScript/issues/31445\n\n stateForExport[key] = nextValue;\n }\n }\n\n return stateForExport;\n};\n\nconst clearAppStateForLocalStorage = appState => {\n return _clearAppStateForStorage(appState, \"browser\");\n};\nconst cleanAppStateForExport = appState => {\n return _clearAppStateForStorage(appState, \"export\");\n};\nconst clearAppStateForDatabase = appState => {\n return _clearAppStateForStorage(appState, \"server\");\n};\nconst isEraserActive = ({\n activeTool\n}) => activeTool.type === \"eraser\";\nconst isHandToolActive = ({\n activeTool\n}) => {\n return activeTool.type === \"hand\";\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../appState.ts?");
2207
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"cleanAppStateForExport\": () => (/* binding */ cleanAppStateForExport),\n/* harmony export */ \"clearAppStateForDatabase\": () => (/* binding */ clearAppStateForDatabase),\n/* harmony export */ \"clearAppStateForLocalStorage\": () => (/* binding */ clearAppStateForLocalStorage),\n/* harmony export */ \"getDefaultAppState\": () => (/* binding */ getDefaultAppState),\n/* harmony export */ \"isEraserActive\": () => (/* binding */ isEraserActive),\n/* harmony export */ \"isHandToolActive\": () => (/* binding */ isHandToolActive),\n/* harmony export */ \"isLaserPointerActive\": () => (/* binding */ isLaserPointerActive)\n/* harmony export */ });\n/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ \"../../colors.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ \"../../constants.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./i18n */ \"../../i18n.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"../../utils.ts\");\n\n\n\n\nconst defaultExportScale = 1; //zsviczian - iPad scaling issue on export\n\n/*EXPORT_SCALES.includes(devicePixelRatio)\r\n ? devicePixelRatio\r\n : 1;*/\n\nconst getDefaultAppState = () => {\n return {\n showWelcomeScreen: false,\n theme: _constants__WEBPACK_IMPORTED_MODULE_1__.THEME.LIGHT,\n collaborators: new Map(),\n currentChartType: \"bar\",\n currentItemBackgroundColor: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.backgroundColor,\n currentItemEndArrowhead: \"arrow\",\n currentItemFillStyle: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.fillStyle,\n currentItemFontFamily: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_FONT_FAMILY,\n currentItemFontSize: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_FONT_SIZE,\n currentItemOpacity: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.opacity,\n currentItemRoughness: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.roughness,\n currentItemStartArrowhead: null,\n currentItemStrokeColor: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.strokeColor,\n currentItemRoundness: \"round\",\n currentItemStrokeStyle: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.strokeStyle,\n currentItemStrokeWidth: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.strokeWidth,\n currentItemTextAlign: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_TEXT_ALIGN,\n cursorButton: \"up\",\n activeEmbeddable: null,\n draggingElement: null,\n editingElement: null,\n editingGroupId: null,\n editingLinearElement: null,\n activeTool: {\n type: \"selection\",\n customType: null,\n locked: _constants__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_ELEMENT_PROPS.locked,\n lastActiveTool: null\n },\n penMode: false,\n penDetected: false,\n errorMessage: null,\n exportBackground: true,\n exportScale: defaultExportScale,\n exportEmbedScene: false,\n exportWithDarkMode: false,\n fileHandle: null,\n gridSize: null,\n previousGridSize: null,\n isBindingEnabled: true,\n defaultSidebarDockedPreference: false,\n isLoading: false,\n isResizing: false,\n isRotating: false,\n lastPointerDownWith: \"mouse\",\n multiElement: null,\n name: `${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.untitled\")}-${(0,_utils__WEBPACK_IMPORTED_MODULE_3__.getDateTime)()}`,\n contextMenu: null,\n openMenu: null,\n openPopup: null,\n openSidebar: null,\n openDialog: null,\n pasteDialog: {\n shown: false,\n data: null\n },\n previousSelectedElementIds: {},\n resizingElement: null,\n scrolledOutside: false,\n scrollX: 0,\n scrollY: 0,\n selectedElementIds: {},\n selectedGroupIds: {},\n selectedElementsAreBeingDragged: false,\n selectionElement: null,\n shouldCacheIgnoreZoom: false,\n showStats: false,\n startBoundElement: null,\n suggestedBindings: [],\n frameRendering: {\n enabled: true,\n clip: true,\n name: true,\n outline: true\n },\n frameToHighlight: null,\n editingFrame: null,\n elementsToHighlight: null,\n toast: null,\n viewBackgroundColor: _colors__WEBPACK_IMPORTED_MODULE_0__.COLOR_PALETTE.white,\n zenModeEnabled: false,\n zoom: {\n value: 1\n },\n viewModeEnabled: false,\n pendingImageElementId: null,\n showHyperlinkPopup: false,\n linkOpacity: 1,\n trayModeEnabled: false,\n colorPalette: undefined,\n allowPinchZoom: false,\n allowWheelZoom: false,\n pinnedScripts: [],\n customPens: [],\n currentStrokeOptions: null,\n resetCustomPen: null,\n gridColor: {\n Bold: \"#cccccc\",\n Regular: \"#e5e5e5\"\n },\n dynamicStyle: \"\",\n invertBindingBehaviour: false,\n selectedLinearElement: null,\n snapLines: [],\n originSnapOffset: {\n x: 0,\n y: 0\n },\n objectsSnapModeEnabled: false\n };\n};\n/**\r\n * Config containing all AppState keys. Used to determine whether given state\r\n * prop should be stripped when exporting to given storage type.\r\n */\n\nconst APP_STATE_STORAGE_CONF = (config => config)({\n showWelcomeScreen: {\n browser: true,\n export: false,\n server: false\n },\n theme: {\n browser: true,\n export: false,\n server: false\n },\n collaborators: {\n browser: false,\n export: false,\n server: false\n },\n currentChartType: {\n browser: true,\n export: false,\n server: false\n },\n currentItemBackgroundColor: {\n browser: true,\n export: false,\n server: false\n },\n currentItemEndArrowhead: {\n browser: true,\n export: false,\n server: false\n },\n currentItemFillStyle: {\n browser: true,\n export: false,\n server: false\n },\n currentItemFontFamily: {\n browser: true,\n export: false,\n server: false\n },\n currentItemFontSize: {\n browser: true,\n export: false,\n server: false\n },\n currentItemRoundness: {\n browser: true,\n export: false,\n server: false\n },\n currentItemOpacity: {\n browser: true,\n export: false,\n server: false\n },\n currentItemRoughness: {\n browser: true,\n export: false,\n server: false\n },\n currentItemStartArrowhead: {\n browser: true,\n export: false,\n server: false\n },\n currentItemStrokeColor: {\n browser: true,\n export: false,\n server: false\n },\n currentItemStrokeStyle: {\n browser: true,\n export: false,\n server: false\n },\n currentItemStrokeWidth: {\n browser: true,\n export: false,\n server: false\n },\n currentItemTextAlign: {\n browser: true,\n export: false,\n server: false\n },\n cursorButton: {\n browser: true,\n export: false,\n server: false\n },\n activeEmbeddable: {\n browser: false,\n export: false,\n server: false\n },\n draggingElement: {\n browser: false,\n export: false,\n server: false\n },\n editingElement: {\n browser: false,\n export: false,\n server: false\n },\n editingGroupId: {\n browser: true,\n export: false,\n server: false\n },\n editingLinearElement: {\n browser: false,\n export: false,\n server: false\n },\n activeTool: {\n browser: true,\n export: false,\n server: false\n },\n penMode: {\n browser: true,\n export: false,\n server: false\n },\n penDetected: {\n browser: true,\n export: false,\n server: false\n },\n errorMessage: {\n browser: false,\n export: false,\n server: false\n },\n exportBackground: {\n browser: true,\n export: false,\n server: false\n },\n exportEmbedScene: {\n browser: true,\n export: false,\n server: false\n },\n exportScale: {\n browser: true,\n export: false,\n server: false\n },\n exportWithDarkMode: {\n browser: true,\n export: false,\n server: false\n },\n fileHandle: {\n browser: false,\n export: false,\n server: false\n },\n gridSize: {\n browser: true,\n export: true,\n server: true\n },\n previousGridSize: {\n browser: false,\n export: false,\n server: false\n },\n height: {\n browser: false,\n export: false,\n server: false\n },\n isBindingEnabled: {\n browser: false,\n export: false,\n server: false\n },\n defaultSidebarDockedPreference: {\n browser: true,\n export: false,\n server: false\n },\n isLoading: {\n browser: false,\n export: false,\n server: false\n },\n isResizing: {\n browser: false,\n export: false,\n server: false\n },\n isRotating: {\n browser: false,\n export: false,\n server: false\n },\n lastPointerDownWith: {\n browser: true,\n export: false,\n server: false\n },\n multiElement: {\n browser: false,\n export: false,\n server: false\n },\n name: {\n browser: true,\n export: false,\n server: false\n },\n offsetLeft: {\n browser: false,\n export: false,\n server: false\n },\n offsetTop: {\n browser: false,\n export: false,\n server: false\n },\n contextMenu: {\n browser: false,\n export: false,\n server: false\n },\n openMenu: {\n browser: true,\n export: false,\n server: false\n },\n openPopup: {\n browser: false,\n export: false,\n server: false\n },\n openSidebar: {\n browser: true,\n export: false,\n server: false\n },\n openDialog: {\n browser: false,\n export: false,\n server: false\n },\n pasteDialog: {\n browser: false,\n export: false,\n server: false\n },\n previousSelectedElementIds: {\n browser: true,\n export: false,\n server: false\n },\n resizingElement: {\n browser: false,\n export: false,\n server: false\n },\n scrolledOutside: {\n browser: true,\n export: false,\n server: false\n },\n scrollX: {\n browser: true,\n export: false,\n server: false\n },\n scrollY: {\n browser: true,\n export: false,\n server: false\n },\n selectedElementIds: {\n browser: true,\n export: false,\n server: false\n },\n selectedGroupIds: {\n browser: true,\n export: false,\n server: false\n },\n selectedElementsAreBeingDragged: {\n browser: false,\n export: false,\n server: false\n },\n selectionElement: {\n browser: false,\n export: false,\n server: false\n },\n shouldCacheIgnoreZoom: {\n browser: true,\n export: false,\n server: false\n },\n showStats: {\n browser: true,\n export: false,\n server: false\n },\n startBoundElement: {\n browser: false,\n export: false,\n server: false\n },\n suggestedBindings: {\n browser: false,\n export: false,\n server: false\n },\n frameRendering: {\n browser: false,\n export: false,\n server: false\n },\n frameToHighlight: {\n browser: false,\n export: false,\n server: false\n },\n editingFrame: {\n browser: false,\n export: false,\n server: false\n },\n elementsToHighlight: {\n browser: false,\n export: false,\n server: false\n },\n toast: {\n browser: false,\n export: false,\n server: false\n },\n viewBackgroundColor: {\n browser: true,\n export: true,\n server: true\n },\n width: {\n browser: false,\n export: false,\n server: false\n },\n zenModeEnabled: {\n browser: true,\n export: false,\n server: false\n },\n zoom: {\n browser: true,\n export: false,\n server: false\n },\n viewModeEnabled: {\n browser: false,\n export: false,\n server: false\n },\n pendingImageElementId: {\n browser: false,\n export: false,\n server: false\n },\n showHyperlinkPopup: {\n browser: false,\n export: false,\n server: false\n },\n linkOpacity: {\n browser: false,\n export: false,\n server: false\n },\n trayModeEnabled: {\n browser: false,\n export: false,\n server: false\n },\n colorPalette: {\n browser: false,\n export: false,\n server: false\n },\n allowPinchZoom: {\n browser: false,\n export: false,\n server: false\n },\n allowWheelZoom: {\n browser: false,\n export: false,\n server: false\n },\n pinnedScripts: {\n browser: false,\n export: false,\n server: false\n },\n customPens: {\n browser: false,\n export: false,\n server: false\n },\n currentStrokeOptions: {\n browser: false,\n export: false,\n server: false\n },\n resetCustomPen: {\n browser: false,\n export: false,\n server: false\n },\n gridColor: {\n browser: false,\n export: false,\n server: false\n },\n dynamicStyle: {\n browser: false,\n export: false,\n server: false\n },\n invertBindingBehaviour: {\n browser: false,\n export: false,\n server: false\n },\n selectedLinearElement: {\n browser: true,\n export: false,\n server: false\n },\n snapLines: {\n browser: false,\n export: false,\n server: false\n },\n originSnapOffset: {\n browser: false,\n export: false,\n server: false\n },\n objectsSnapModeEnabled: {\n browser: true,\n export: false,\n server: false\n }\n});\n\nconst _clearAppStateForStorage = (appState, exportType) => {\n const stateForExport = {};\n\n for (const key of Object.keys(appState)) {\n const propConfig = APP_STATE_STORAGE_CONF[key];\n\n if (propConfig === null || propConfig === void 0 ? void 0 : propConfig[exportType]) {\n const nextValue = appState[key]; // https://github.com/microsoft/TypeScript/issues/31445\n\n stateForExport[key] = nextValue;\n }\n }\n\n return stateForExport;\n};\n\nconst clearAppStateForLocalStorage = appState => {\n return _clearAppStateForStorage(appState, \"browser\");\n};\nconst cleanAppStateForExport = appState => {\n return _clearAppStateForStorage(appState, \"export\");\n};\nconst clearAppStateForDatabase = appState => {\n return _clearAppStateForStorage(appState, \"server\");\n};\nconst isEraserActive = ({\n activeTool\n}) => activeTool.type === \"eraser\";\nconst isHandToolActive = ({\n activeTool\n}) => {\n return activeTool.type === \"hand\";\n};\nconst isLaserPointerActive = ({\n activeTool\n}) => {\n return activeTool.type === \"laser\";\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../appState.ts?");
2186
2208
 
2187
2209
  /***/ }),
2188
2210
 
@@ -2237,7 +2259,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
2237
2259
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2238
2260
 
2239
2261
  "use strict";
2240
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExitZenModeAction\": () => (/* binding */ ExitZenModeAction),\n/* harmony export */ \"FinalizeAction\": () => (/* binding */ FinalizeAction),\n/* harmony export */ \"SelectedShapeActions\": () => (/* binding */ SelectedShapeActions),\n/* harmony export */ \"ShapesSwitcher\": () => (/* binding */ ShapesSwitcher),\n/* harmony export */ \"UndoRedoActions\": () => (/* binding */ UndoRedoActions),\n/* harmony export */ \"ZoomActions\": () => (/* binding */ ZoomActions)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _components_App__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../components/App */ \"../../components/App.tsx\");\n/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../scene */ \"../../scene/index.ts\");\n/* harmony import */ var _shapes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../shapes */ \"../../shapes.tsx\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _Stack__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Stack */ \"../../components/Stack.tsx\");\n/* harmony import */ var _ToolButton__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ToolButton */ \"../../components/ToolButton.tsx\");\n/* harmony import */ var _scene_comparisons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../scene/comparisons */ \"../../scene/comparisons.ts\");\n/* harmony import */ var _analytics__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../analytics */ \"../../analytics.ts\");\n/* harmony import */ var _element_typeChecks__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../element/typeChecks */ \"../../element/typeChecks.ts\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! clsx */ \"../../../node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../actions */ \"../../actions/index.ts\");\n/* harmony import */ var _element_textElement__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../element/textElement */ \"../../element/textElement.ts\");\n/* harmony import */ var _Actions_scss__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Actions.scss */ \"../../components/Actions.scss\");\n/* harmony import */ var _dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./dropdownMenu/DropdownMenu */ \"../../components/dropdownMenu/DropdownMenu.tsx\");\n/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./icons */ \"../../components/icons.tsx\");\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../keys */ \"../../keys.ts\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // import { Tooltip } from \"./Tooltip\"; //zsviczian\n\n\n\n\n\n\nconst SelectedShapeActions = ({\n appState,\n elements,\n renderAction\n}) => {\n var _a;\n\n const targetElements = (0,_scene__WEBPACK_IMPORTED_MODULE_5__.getTargetElements)((0,_element__WEBPACK_IMPORTED_MODULE_2__.getNonDeletedElements)(elements), appState);\n let isSingleElementBoundContainer = false;\n\n if (targetElements.length === 2 && ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_12__.hasBoundTextElement)(targetElements[0]) || (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_12__.hasBoundTextElement)(targetElements[1]))) {\n isSingleElementBoundContainer = true;\n }\n\n const isEditing = Boolean(appState.editingElement);\n const device = (0,_components_App__WEBPACK_IMPORTED_MODULE_4__.useDevice)();\n const isRTL = document.documentElement.getAttribute(\"dir\") === \"rtl\";\n const showFillIcons = (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasBackground)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasBackground)(element.type) && !(0,_utils__WEBPACK_IMPORTED_MODULE_7__.isTransparent)(element.backgroundColor));\n const showChangeBackgroundIcons = (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasBackground)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasBackground)(element.type));\n const showLinkIcon = targetElements.length === 1 || isSingleElementBoundContainer;\n let commonSelectedType = ((_a = targetElements[0]) === null || _a === void 0 ? void 0 : _a.type) || null;\n\n for (const element of targetElements) {\n if (element.type !== commonSelectedType) {\n commonSelectedType = null;\n break;\n }\n }\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"panelColumn\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n children: ((0,_scene_comparisons__WEBPACK_IMPORTED_MODULE_10__.hasStrokeColor)(appState.activeTool.type) && appState.activeTool.type !== \"image\" && commonSelectedType !== \"image\" && commonSelectedType !== \"frame\" || targetElements.some(element => (0,_scene_comparisons__WEBPACK_IMPORTED_MODULE_10__.hasStrokeColor)(element.type))) && renderAction(\"changeStrokeColor\")\n }), showChangeBackgroundIcons && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n children: renderAction(\"changeBackgroundColor\")\n }), showFillIcons && renderAction(\"changeFillStyle\"), ((0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasStrokeWidth)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasStrokeWidth)(element.type))) && renderAction(\"changeStrokeWidth\"), (appState.activeTool.type === \"freedraw\" || targetElements.some(element => element.type === \"freedraw\")) && renderAction(\"changeStrokeShape\"), ((0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasStrokeStyle)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasStrokeStyle)(element.type))) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [renderAction(\"changeStrokeStyle\"), renderAction(\"changeSloppiness\")]\n }), ((0,_scene__WEBPACK_IMPORTED_MODULE_5__.canChangeRoundness)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.canChangeRoundness)(element.type))) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: renderAction(\"changeRoundness\")\n }), ((0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasText)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasText)(element.type))) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [renderAction(\"changeFontSize\"), renderAction(\"changeFontFamily\"), (0,_element_textElement__WEBPACK_IMPORTED_MODULE_15__.suppportsHorizontalAlign)(targetElements) && renderAction(\"changeTextAlign\")]\n }), (0,_element_textElement__WEBPACK_IMPORTED_MODULE_15__.shouldAllowVerticalAlign)(targetElements) && renderAction(\"changeVerticalAlign\"), ((0,_scene__WEBPACK_IMPORTED_MODULE_5__.canHaveArrowheads)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.canHaveArrowheads)(element.type))) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: renderAction(\"changeArrowhead\")\n }), renderAction(\"changeOpacity\"), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"fieldset\", {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"legend\", {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"labels.layers\")\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"buttonList\"\n }, {\n children: [renderAction(\"sendToBack\"), renderAction(\"sendBackward\"), renderAction(\"bringToFront\"), renderAction(\"bringForward\")]\n }))]\n }), targetElements.length > 1 && !isSingleElementBoundContainer && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"fieldset\", {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"legend\", {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"labels.align\")\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"buttonList\"\n }, {\n children: [isRTL ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [renderAction(\"alignRight\"), renderAction(\"alignHorizontallyCentered\"), renderAction(\"alignLeft\")]\n }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [renderAction(\"alignLeft\"), renderAction(\"alignHorizontallyCentered\"), renderAction(\"alignRight\")]\n }), targetElements.length > 2 && renderAction(\"distributeHorizontally\"), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n style: {\n flexBasis: \"100%\",\n height: 0\n }\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n style: {\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: \".5rem\",\n marginTop: \"-0.5rem\"\n }\n }, {\n children: [renderAction(\"alignTop\"), renderAction(\"alignVerticallyCentered\"), renderAction(\"alignBottom\"), targetElements.length > 2 && renderAction(\"distributeVertically\")]\n }))]\n }))]\n }), !isEditing && targetElements.length > 0 && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"fieldset\", {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"legend\", {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"labels.actions\")\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"buttonList\"\n }, {\n children: [!device.isMobile && renderAction(\"duplicateSelection\"), !device.isMobile && renderAction(\"deleteSelectedElements\"), renderAction(\"group\"), renderAction(\"ungroup\"), showLinkIcon && renderAction(\"hyperlink\")]\n }))]\n })]\n }));\n};\nconst ShapesSwitcher = ({\n interactiveCanvas,\n activeTool,\n setAppState,\n onImageAction,\n appState\n}) => {\n const [isExtraToolsMenuOpen, setIsExtraToolsMenuOpen] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [_shapes__WEBPACK_IMPORTED_MODULE_6__.SHAPES.map(({\n value,\n icon,\n key,\n numericKey,\n fillable\n }, index) => {\n const label = (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(`toolBar.${value}`);\n const letter = key && (0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)(typeof key === \"string\" ? key : key[0]);\n const shortcut = letter ? `${letter} ${(0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"helpDialog.or\")} ${numericKey}` : `${numericKey}`;\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ToolButton__WEBPACK_IMPORTED_MODULE_9__.ToolButton, {\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(\"Shape\", {\n fillable\n }),\n type: \"radio\",\n icon: icon,\n checked: activeTool.type === value,\n name: \"editor-current-shape\",\n title: `${(0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)(label)} — ${shortcut}`,\n keyBindingLabel: numericKey || letter,\n \"aria-label\": (0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)(label),\n \"aria-keyshortcuts\": shortcut,\n \"data-testid\": `toolbar-${value}`,\n onPointerDown: ({\n pointerType\n }) => {\n if (!appState.penDetected && pointerType === \"pen\") {\n setAppState({\n penDetected: true,\n penMode: true\n });\n }\n },\n onChange: ({\n pointerType\n }) => {\n if (appState.activeTool.type !== value) {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_11__.trackEvent)(\"toolbar\", value, \"ui\");\n }\n\n const nextActiveTool = (0,_utils__WEBPACK_IMPORTED_MODULE_7__.updateActiveTool)(appState, {\n type: value\n });\n setAppState({\n activeTool: nextActiveTool,\n activeEmbeddable: null,\n multiElement: null,\n selectedElementIds: {}\n });\n (0,_utils__WEBPACK_IMPORTED_MODULE_7__.setCursorForShape)(interactiveCanvas, Object.assign(Object.assign({}, appState), {\n activeTool: nextActiveTool\n }));\n\n if (value === \"image\") {\n onImageAction({\n pointerType\n });\n }\n }\n }, value);\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"App-toolbar__divider\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"], Object.assign({\n open: isExtraToolsMenuOpen\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"].Trigger, Object.assign({\n className: \"App-toolbar__extra-tools-trigger\",\n onToggle: () => setIsExtraToolsMenuOpen(!isExtraToolsMenuOpen),\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.extraTools\")\n }, {\n children: _icons__WEBPACK_IMPORTED_MODULE_18__.extraToolsIcon\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"].Content, Object.assign({\n onClickOutside: () => setIsExtraToolsMenuOpen(false),\n onSelect: () => setIsExtraToolsMenuOpen(false),\n className: \"App-toolbar__extra-tools-dropdown\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"].Item, Object.assign({\n onSelect: () => {\n const nextActiveTool = (0,_utils__WEBPACK_IMPORTED_MODULE_7__.updateActiveTool)(appState, {\n type: \"frame\"\n });\n setTimeout(() => setAppState({\n activeTool: nextActiveTool,\n multiElement: null,\n selectedElementIds: {},\n activeEmbeddable: null\n })); //zsviczian added setTimeout wrapper because tools wouldn't select on first click\n },\n icon: _icons__WEBPACK_IMPORTED_MODULE_18__.frameToolIcon,\n shortcut: _keys__WEBPACK_IMPORTED_MODULE_19__.KEYS.F.toLocaleUpperCase(),\n \"data-testid\": \"toolbar-frame\"\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.frame\")\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"].Item, Object.assign({\n onSelect: () => {\n const nextActiveTool = (0,_utils__WEBPACK_IMPORTED_MODULE_7__.updateActiveTool)(appState, {\n type: \"embeddable\"\n });\n setTimeout(() => setAppState({\n activeTool: nextActiveTool,\n multiElement: null,\n selectedElementIds: {},\n activeEmbeddable: null\n })); //zsviczian added setTimeout wrapper because tools wouldn't select on first click\n },\n icon: _icons__WEBPACK_IMPORTED_MODULE_18__.EmbedIcon,\n \"data-testid\": \"toolbar-embeddable\"\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.embeddable\")\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"].Item, Object.assign({\n onSelect: () => {\n const nextActiveTool = (0,_utils__WEBPACK_IMPORTED_MODULE_7__.updateActiveTool)(appState, {\n type: \"mermaid\"\n });\n setTimeout(() => setAppState({\n activeTool: nextActiveTool,\n multiElement: null\n })); //zsviczian added setTimeout wrapper and removed selectedElementIds\n },\n icon: _icons__WEBPACK_IMPORTED_MODULE_18__.mermaidLogoIcon,\n \"data-testid\": \"toolbar-embeddable\"\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.mermaidToExcalidraw\")\n }))]\n }))]\n }))]\n });\n};\nconst ZoomActions = ({\n renderAction,\n zoom,\n trayMode = false //zsviczian\n\n}) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stack__WEBPACK_IMPORTED_MODULE_8__[\"default\"].Col, Object.assign({\n gap: 1,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(\"zoom-actions\", {\n \"tray-zoom\": trayMode\n })\n}, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Stack__WEBPACK_IMPORTED_MODULE_8__[\"default\"].Row, Object.assign({\n align: \"center\"\n }, {\n children: [renderAction(\"zoomOut\"), renderAction(\"resetZoom\"), renderAction(\"zoomIn\")]\n }))\n}));\nconst UndoRedoActions = ({\n renderAction,\n className\n}) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: `undo-redo-buttons ${className}`\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"undo-button-container\"\n }, {\n children: renderAction(\"undo\")\n /* //zsviczian */\n\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"redo-button-container\"\n }, {\n children: renderAction(\"redo\")\n /* //zsviczian */\n\n }))]\n}));\nconst ExitZenModeAction = ({\n actionManager,\n showExitZenModeBtn\n}) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"button\", Object.assign({\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(\"disable-zen-mode\", {\n \"disable-zen-mode--visible\": showExitZenModeBtn\n }),\n onClick: () => actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_14__.actionToggleZenMode)\n}, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"buttons.exitZenMode\")\n}));\nconst FinalizeAction = ({\n renderAction,\n className\n}) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: `finalize-button ${className}`\n}, {\n children: renderAction(\"finalize\", {\n size: \"small\"\n })\n}));\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/Actions.tsx?");
2262
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExitZenModeAction\": () => (/* binding */ ExitZenModeAction),\n/* harmony export */ \"FinalizeAction\": () => (/* binding */ FinalizeAction),\n/* harmony export */ \"SelectedShapeActions\": () => (/* binding */ SelectedShapeActions),\n/* harmony export */ \"ShapesSwitcher\": () => (/* binding */ ShapesSwitcher),\n/* harmony export */ \"UndoRedoActions\": () => (/* binding */ UndoRedoActions),\n/* harmony export */ \"ZoomActions\": () => (/* binding */ ZoomActions)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _components_App__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../components/App */ \"../../components/App.tsx\");\n/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../scene */ \"../../scene/index.ts\");\n/* harmony import */ var _shapes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../shapes */ \"../../shapes.tsx\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _Stack__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Stack */ \"../../components/Stack.tsx\");\n/* harmony import */ var _ToolButton__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ToolButton */ \"../../components/ToolButton.tsx\");\n/* harmony import */ var _scene_comparisons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../scene/comparisons */ \"../../scene/comparisons.ts\");\n/* harmony import */ var _analytics__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../analytics */ \"../../analytics.ts\");\n/* harmony import */ var _element_typeChecks__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../element/typeChecks */ \"../../element/typeChecks.ts\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! clsx */ \"../../../node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../actions */ \"../../actions/index.ts\");\n/* harmony import */ var _element_textElement__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../element/textElement */ \"../../element/textElement.ts\");\n/* harmony import */ var _Actions_scss__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Actions.scss */ \"../../components/Actions.scss\");\n/* harmony import */ var _dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./dropdownMenu/DropdownMenu */ \"../../components/dropdownMenu/DropdownMenu.tsx\");\n/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./icons */ \"../../components/icons.tsx\");\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../keys */ \"../../keys.ts\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // import { Tooltip } from \"./Tooltip\"; //zsviczian\n\n\n\n\n\n\nconst SelectedShapeActions = ({\n appState,\n elements,\n renderAction\n}) => {\n var _a;\n\n const targetElements = (0,_scene__WEBPACK_IMPORTED_MODULE_5__.getTargetElements)((0,_element__WEBPACK_IMPORTED_MODULE_2__.getNonDeletedElements)(elements), appState);\n let isSingleElementBoundContainer = false;\n\n if (targetElements.length === 2 && ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_12__.hasBoundTextElement)(targetElements[0]) || (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_12__.hasBoundTextElement)(targetElements[1]))) {\n isSingleElementBoundContainer = true;\n }\n\n const isEditing = Boolean(appState.editingElement);\n const device = (0,_components_App__WEBPACK_IMPORTED_MODULE_4__.useDevice)();\n const isRTL = document.documentElement.getAttribute(\"dir\") === \"rtl\";\n const showFillIcons = (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasBackground)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasBackground)(element.type) && !(0,_utils__WEBPACK_IMPORTED_MODULE_7__.isTransparent)(element.backgroundColor));\n const showChangeBackgroundIcons = (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasBackground)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasBackground)(element.type));\n const showLinkIcon = targetElements.length === 1 || isSingleElementBoundContainer;\n let commonSelectedType = ((_a = targetElements[0]) === null || _a === void 0 ? void 0 : _a.type) || null;\n\n for (const element of targetElements) {\n if (element.type !== commonSelectedType) {\n commonSelectedType = null;\n break;\n }\n }\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"panelColumn\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n children: ((0,_scene_comparisons__WEBPACK_IMPORTED_MODULE_10__.hasStrokeColor)(appState.activeTool.type) && appState.activeTool.type !== \"image\" && commonSelectedType !== \"image\" && commonSelectedType !== \"frame\" || targetElements.some(element => (0,_scene_comparisons__WEBPACK_IMPORTED_MODULE_10__.hasStrokeColor)(element.type))) && renderAction(\"changeStrokeColor\")\n }), showChangeBackgroundIcons && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n children: renderAction(\"changeBackgroundColor\")\n }), showFillIcons && renderAction(\"changeFillStyle\"), ((0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasStrokeWidth)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasStrokeWidth)(element.type))) && renderAction(\"changeStrokeWidth\"), (appState.activeTool.type === \"freedraw\" || targetElements.some(element => element.type === \"freedraw\")) && renderAction(\"changeStrokeShape\"), ((0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasStrokeStyle)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasStrokeStyle)(element.type))) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [renderAction(\"changeStrokeStyle\"), renderAction(\"changeSloppiness\")]\n }), ((0,_scene__WEBPACK_IMPORTED_MODULE_5__.canChangeRoundness)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.canChangeRoundness)(element.type))) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: renderAction(\"changeRoundness\")\n }), ((0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasText)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.hasText)(element.type))) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [renderAction(\"changeFontSize\"), renderAction(\"changeFontFamily\"), (0,_element_textElement__WEBPACK_IMPORTED_MODULE_15__.suppportsHorizontalAlign)(targetElements) && renderAction(\"changeTextAlign\")]\n }), (0,_element_textElement__WEBPACK_IMPORTED_MODULE_15__.shouldAllowVerticalAlign)(targetElements) && renderAction(\"changeVerticalAlign\"), ((0,_scene__WEBPACK_IMPORTED_MODULE_5__.canHaveArrowheads)(appState.activeTool.type) || targetElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_5__.canHaveArrowheads)(element.type))) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: renderAction(\"changeArrowhead\")\n }), renderAction(\"changeOpacity\"), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"fieldset\", {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"legend\", {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"labels.layers\")\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"buttonList\"\n }, {\n children: [renderAction(\"sendToBack\"), renderAction(\"sendBackward\"), renderAction(\"bringToFront\"), renderAction(\"bringForward\")]\n }))]\n }), targetElements.length > 1 && !isSingleElementBoundContainer && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"fieldset\", {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"legend\", {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"labels.align\")\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"buttonList\"\n }, {\n children: [isRTL ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [renderAction(\"alignRight\"), renderAction(\"alignHorizontallyCentered\"), renderAction(\"alignLeft\")]\n }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [renderAction(\"alignLeft\"), renderAction(\"alignHorizontallyCentered\"), renderAction(\"alignRight\")]\n }), targetElements.length > 2 && renderAction(\"distributeHorizontally\"), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n style: {\n flexBasis: \"100%\",\n height: 0\n }\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n style: {\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: \".5rem\",\n marginTop: \"-0.5rem\"\n }\n }, {\n children: [renderAction(\"alignTop\"), renderAction(\"alignVerticallyCentered\"), renderAction(\"alignBottom\"), targetElements.length > 2 && renderAction(\"distributeVertically\")]\n }))]\n }))]\n }), !isEditing && targetElements.length > 0 && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"fieldset\", {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"legend\", {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"labels.actions\")\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"buttonList\"\n }, {\n children: [!device.isMobile && renderAction(\"duplicateSelection\"), !device.isMobile && renderAction(\"deleteSelectedElements\"), renderAction(\"group\"), renderAction(\"ungroup\"), showLinkIcon && renderAction(\"hyperlink\")]\n }))]\n })]\n }));\n};\nconst ShapesSwitcher = ({\n interactiveCanvas,\n activeTool,\n onImageAction,\n appState,\n app\n}) => {\n const {\n renderMermaid\n } = (0,_components_App__WEBPACK_IMPORTED_MODULE_4__.useAppProps)(); //zsviczian\n\n const [isExtraToolsMenuOpen, setIsExtraToolsMenuOpen] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);\n const device = (0,_components_App__WEBPACK_IMPORTED_MODULE_4__.useDevice)();\n const frameToolSelected = activeTool.type === \"frame\";\n const laserToolSelected = activeTool.type === \"laser\";\n const embeddableToolSelected = activeTool.type === \"embeddable\";\n const mermaidToolSelected = activeTool.type === \"mermaid\";\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [_shapes__WEBPACK_IMPORTED_MODULE_6__.SHAPES.map(({\n value,\n icon,\n key,\n numericKey,\n fillable\n }, index) => {\n const label = (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(`toolBar.${value}`);\n const letter = key && (0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)(typeof key === \"string\" ? key : key[0]);\n const shortcut = letter ? `${letter} ${(0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"helpDialog.or\")} ${numericKey}` : `${numericKey}`;\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ToolButton__WEBPACK_IMPORTED_MODULE_9__.ToolButton, {\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(\"Shape\", {\n fillable\n }),\n type: \"radio\",\n icon: icon,\n checked: activeTool.type === value,\n name: \"editor-current-shape\",\n title: `${(0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)(label)} — ${shortcut}`,\n keyBindingLabel: numericKey || letter,\n \"aria-label\": (0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)(label),\n \"aria-keyshortcuts\": shortcut,\n \"data-testid\": `toolbar-${value}`,\n onPointerDown: ({\n pointerType\n }) => {\n if (!appState.penDetected && pointerType === \"pen\") {\n app.togglePenMode(true);\n }\n },\n onChange: ({\n pointerType\n }) => {\n if (appState.activeTool.type !== value) {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_11__.trackEvent)(\"toolbar\", value, \"ui\");\n }\n\n app.setActiveTool({\n type: value\n });\n\n if (value === \"image\") {\n onImageAction({\n pointerType\n });\n }\n }\n }, value);\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"App-toolbar__divider\"\n }), device.isMobile ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ToolButton__WEBPACK_IMPORTED_MODULE_9__.ToolButton, {\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(\"Shape\", {\n fillable: false\n }),\n type: \"radio\",\n icon: _icons__WEBPACK_IMPORTED_MODULE_18__.frameToolIcon,\n checked: activeTool.type === \"frame\",\n name: \"editor-current-shape\",\n title: `${(0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)((0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.frame\"))} — ${_keys__WEBPACK_IMPORTED_MODULE_19__.KEYS.F.toLocaleUpperCase()}`,\n keyBindingLabel: _keys__WEBPACK_IMPORTED_MODULE_19__.KEYS.F.toLocaleUpperCase(),\n \"aria-label\": (0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)((0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.frame\")),\n \"aria-keyshortcuts\": _keys__WEBPACK_IMPORTED_MODULE_19__.KEYS.F.toLocaleUpperCase(),\n \"data-testid\": `toolbar-frame`,\n onPointerDown: ({\n pointerType\n }) => {\n if (!appState.penDetected && pointerType === \"pen\") {\n app.togglePenMode(true);\n }\n },\n onChange: ({\n pointerType\n }) => {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_11__.trackEvent)(\"toolbar\", \"frame\", \"ui\");\n app.setActiveTool({\n type: \"frame\"\n });\n },\n selected: activeTool.type === \"frame\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ToolButton__WEBPACK_IMPORTED_MODULE_9__.ToolButton, {\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(\"Shape\", {\n fillable: false\n }),\n type: \"radio\",\n icon: _icons__WEBPACK_IMPORTED_MODULE_18__.EmbedIcon,\n checked: activeTool.type === \"embeddable\",\n name: \"editor-current-shape\",\n title: (0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)((0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.embeddable\")),\n \"aria-label\": (0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)((0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.embeddable\")),\n \"data-testid\": `toolbar-embeddable`,\n onPointerDown: ({\n pointerType\n }) => {\n if (!appState.penDetected && pointerType === \"pen\") {\n app.togglePenMode(true);\n }\n },\n onChange: ({\n pointerType\n }) => {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_11__.trackEvent)(\"toolbar\", \"embeddable\", \"ui\");\n app.setActiveTool({\n type: \"embeddable\"\n });\n },\n selected: activeTool.type === \"embeddable\"\n }), renderMermaid && //zsviczian\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ToolButton__WEBPACK_IMPORTED_MODULE_9__.ToolButton, {\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(\"Shape\", {\n fillable: false\n }),\n type: \"radio\",\n icon: _icons__WEBPACK_IMPORTED_MODULE_18__.mermaidLogoIcon,\n checked: activeTool.type === \"mermaid\",\n name: \"editor-current-shape\",\n title: (0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)((0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.mermaidToExcalidraw\")),\n \"aria-label\": (0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)((0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.mermaidToExcalidraw\")),\n \"data-testid\": `toolbar-mermaidToExcalidraw`,\n onPointerDown: ({\n pointerType\n }) => {\n if (!appState.penDetected && pointerType === \"pen\") {\n app.togglePenMode(true);\n }\n },\n onChange: ({\n pointerType\n }) => {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_11__.trackEvent)(\"toolbar\", \"mermaid\", \"ui\");\n app.setActiveTool({\n type: \"mermaid\"\n });\n },\n selected: activeTool.type === \"mermaid\"\n })]\n }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"], Object.assign({\n open: isExtraToolsMenuOpen\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"].Trigger, Object.assign({\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(\"App-toolbar__extra-tools-trigger\", {\n \"App-toolbar__extra-tools-trigger--selected\": frameToolSelected || embeddableToolSelected || // in collab we're already highlighting the laser button\n // outside toolbar, so let's not highlight extra-tools button\n // on top of it\n laserToolSelected && !app.props.isCollaborating\n }),\n onToggle: () => setIsExtraToolsMenuOpen(!isExtraToolsMenuOpen),\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.extraTools\")\n }, {\n children: _icons__WEBPACK_IMPORTED_MODULE_18__.extraToolsIcon\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"].Content, Object.assign({\n onClickOutside: () => setIsExtraToolsMenuOpen(false),\n onSelect: () => setIsExtraToolsMenuOpen(false),\n className: \"App-toolbar__extra-tools-dropdown\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"].Item, Object.assign({\n onSelect: () => {\n app.setActiveTool({\n type: \"frame\"\n });\n },\n icon: _icons__WEBPACK_IMPORTED_MODULE_18__.frameToolIcon,\n shortcut: _keys__WEBPACK_IMPORTED_MODULE_19__.KEYS.F.toLocaleUpperCase(),\n \"data-testid\": \"toolbar-frame\",\n selected: frameToolSelected\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.frame\")\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"].Item, Object.assign({\n onSelect: () => {\n app.setActiveTool({\n type: \"embeddable\"\n });\n },\n icon: _icons__WEBPACK_IMPORTED_MODULE_18__.EmbedIcon,\n \"data-testid\": \"toolbar-embeddable\",\n selected: embeddableToolSelected\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.embeddable\")\n })), renderMermaid && //zsviczian\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"].Item, Object.assign({\n onSelect: () => {\n app.setActiveTool({\n type: \"mermaid\"\n });\n },\n icon: _icons__WEBPACK_IMPORTED_MODULE_18__.mermaidLogoIcon,\n \"data-testid\": \"toolbar-mermaidToExcalidraw\",\n selected: mermaidToolSelected\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.mermaidToExcalidraw\")\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_dropdownMenu_DropdownMenu__WEBPACK_IMPORTED_MODULE_17__[\"default\"].Item, Object.assign({\n onSelect: () => {\n app.setActiveTool({\n type: \"laser\"\n });\n },\n icon: _icons__WEBPACK_IMPORTED_MODULE_18__.laserPointerToolIcon,\n \"data-testid\": \"toolbar-laser\",\n selected: laserToolSelected,\n shortcut: _keys__WEBPACK_IMPORTED_MODULE_19__.KEYS.K.toLocaleUpperCase()\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"toolBar.laser\")\n }))]\n }))]\n }))]\n });\n};\nconst ZoomActions = ({\n renderAction,\n zoom,\n trayMode = false //zsviczian\n\n}) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stack__WEBPACK_IMPORTED_MODULE_8__[\"default\"].Col, Object.assign({\n gap: 1,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(\"zoom-actions\", {\n \"tray-zoom\": trayMode\n })\n}, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Stack__WEBPACK_IMPORTED_MODULE_8__[\"default\"].Row, Object.assign({\n align: \"center\"\n }, {\n children: [renderAction(\"zoomOut\"), renderAction(\"resetZoom\"), renderAction(\"zoomIn\")]\n }))\n}));\nconst UndoRedoActions = ({\n renderAction,\n className\n}) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: `undo-redo-buttons ${className}`\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"undo-button-container\"\n }, {\n children: renderAction(\"undo\")\n /* //zsviczian */\n\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"redo-button-container\"\n }, {\n children: renderAction(\"redo\")\n /* //zsviczian */\n\n }))]\n}));\nconst ExitZenModeAction = ({\n actionManager,\n showExitZenModeBtn\n}) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"button\", Object.assign({\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(\"disable-zen-mode\", {\n \"disable-zen-mode--visible\": showExitZenModeBtn\n }),\n onClick: () => actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_14__.actionToggleZenMode)\n}, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_3__.t)(\"buttons.exitZenMode\")\n}));\nconst FinalizeAction = ({\n renderAction,\n className\n}) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: `finalize-button ${className}`\n}, {\n children: renderAction(\"finalize\", {\n size: \"small\"\n })\n}));\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/Actions.tsx?");
2241
2263
 
2242
2264
  /***/ }),
2243
2265
 
@@ -2259,7 +2281,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
2259
2281
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2260
2282
 
2261
2283
  "use strict";
2262
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExcalidrawContainerContext\": () => (/* binding */ ExcalidrawContainerContext),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ \"showFourthFont\": () => (/* binding */ showFourthFont),\n/* harmony export */ \"useApp\": () => (/* binding */ useApp),\n/* harmony export */ \"useAppProps\": () => (/* binding */ useAppProps),\n/* harmony export */ \"useDevice\": () => (/* binding */ useDevice),\n/* harmony export */ \"useExcalidrawActionManager\": () => (/* binding */ useExcalidrawActionManager),\n/* harmony export */ \"useExcalidrawAppState\": () => (/* binding */ useExcalidrawAppState),\n/* harmony export */ \"useExcalidrawContainer\": () => (/* binding */ useExcalidrawContainer),\n/* harmony export */ \"useExcalidrawElements\": () => (/* binding */ useExcalidrawElements),\n/* harmony export */ \"useExcalidrawSetAppState\": () => (/* binding */ useExcalidrawSetAppState)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var roughjs_bin_rough__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! roughjs/bin/rough */ \"../../../node_modules/roughjs/bin/rough.js\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"../../../node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var nanoid__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! nanoid */ \"../../../node_modules/nanoid/index.browser.js\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../actions */ \"../../actions/index.ts\");\n/* harmony import */ var _actions_actionHistory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../actions/actionHistory */ \"../../actions/actionHistory.tsx\");\n/* harmony import */ var _actions_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../actions/manager */ \"../../actions/manager.tsx\");\n/* harmony import */ var _actions_register__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../actions/register */ \"../../actions/register.ts\");\n/* harmony import */ var _analytics__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../analytics */ \"../../analytics.ts\");\n/* harmony import */ var _appState__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../appState */ \"../../appState.ts\");\n/* harmony import */ var _clipboard__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../clipboard */ \"../../clipboard.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\n/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../data */ \"../../data/index.ts\");\n/* harmony import */ var _data_library__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../data/library */ \"../../data/library.ts\");\n/* harmony import */ var _data_restore__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../data/restore */ \"../../data/restore.ts\");\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _element_binding__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../element/binding */ \"../../element/binding.ts\");\n/* harmony import */ var _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../element/linearElementEditor */ \"../../element/linearElementEditor.ts\");\n/* harmony import */ var _element_mutateElement__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../element/mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _element_newElement__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../element/newElement */ \"../../element/newElement.ts\");\n/* harmony import */ var _element_typeChecks__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../element/typeChecks */ \"../../element/typeChecks.ts\");\n/* harmony import */ var _gesture__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../gesture */ \"../../gesture.ts\");\n/* harmony import */ var _groups__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../groups */ \"../../groups.ts\");\n/* harmony import */ var _history__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../history */ \"../../history.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../keys */ \"../../keys.ts\");\n/* harmony import */ var _element_sizeHelpers__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../element/sizeHelpers */ \"../../element/sizeHelpers.ts\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../math */ \"../../math.ts\");\n/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../scene */ \"../../scene/index.ts\");\n/* harmony import */ var _scene_Scene__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../scene/Scene */ \"../../scene/Scene.ts\");\n/* harmony import */ var _scene_zoom__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../scene/zoom */ \"../../scene/zoom.ts\");\n/* harmony import */ var _shapes__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../shapes */ \"../../shapes.tsx\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _element_embeddable__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../element/embeddable */ \"../../element/embeddable.ts\");\n/* harmony import */ var _ContextMenu__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./ContextMenu */ \"../../components/ContextMenu.tsx\");\n/* harmony import */ var _LayerUI__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./LayerUI */ \"../../components/LayerUI.tsx\");\n/* harmony import */ var _Toast__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Toast */ \"../../components/Toast.tsx\");\n/* harmony import */ var _actions_actionToggleViewMode__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../actions/actionToggleViewMode */ \"../../actions/actionToggleViewMode.tsx\");\n/* harmony import */ var _data_blob__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../data/blob */ \"../../data/blob.ts\");\n/* harmony import */ var _element_image__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../element/image */ \"../../element/image.ts\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! lodash.throttle */ \"../../../node_modules/lodash.throttle/index.js\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_41__);\n/* harmony import */ var _data_filesystem__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../data/filesystem */ \"../../data/filesystem.ts\");\n/* harmony import */ var _element_textElement__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../element/textElement */ \"../../element/textElement.ts\");\n/* harmony import */ var _element_collision__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../element/collision */ \"../../element/collision.ts\");\n/* harmony import */ var _element_resizeElements__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../element/resizeElements */ \"../../element/resizeElements.ts\");\n/* harmony import */ var _element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../element/Hyperlink */ \"../../element/Hyperlink.tsx\");\n/* harmony import */ var _data_url__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../data/url */ \"../../data/url.ts\");\n/* harmony import */ var _element_transformHandles__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../element/transformHandles */ \"../../element/transformHandles.ts\");\n/* harmony import */ var _actions_actionElementLock__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../actions/actionElementLock */ \"../../actions/actionElementLock.ts\");\n/* harmony import */ var _scene_Fonts__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../scene/Fonts */ \"../../scene/Fonts.ts\");\n/* harmony import */ var _frame__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../frame */ \"../../frame.ts\");\n/* harmony import */ var _scene_selection__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ../scene/selection */ \"../../scene/selection.ts\");\n/* harmony import */ var _actions_actionClipboard__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ../actions/actionClipboard */ \"../../actions/actionClipboard.tsx\");\n/* harmony import */ var _actions_actionFrame__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ../actions/actionFrame */ \"../../actions/actionFrame.ts\");\n/* harmony import */ var _actions_actionCanvas__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../actions/actionCanvas */ \"../../actions/actionCanvas.tsx\");\n/* harmony import */ var _jotai__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../jotai */ \"../../jotai.ts\");\n/* harmony import */ var _ActiveConfirmDialog__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./ActiveConfirmDialog */ \"../../components/ActiveConfirmDialog.tsx\");\n/* harmony import */ var _snapping__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../snapping */ \"../../snapping.ts\");\n/* harmony import */ var _actions_actionBoundText__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../actions/actionBoundText */ \"../../actions/actionBoundText.tsx\");\n/* harmony import */ var _BraveMeasureTextError__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./BraveMeasureTextError */ \"../../components/BraveMeasureTextError.tsx\");\n/* harmony import */ var _EyeDropper__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./EyeDropper */ \"../../components/EyeDropper.tsx\");\n/* harmony import */ var _data_transform__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ../data/transform */ \"../../data/transform.ts\");\n/* harmony import */ var _Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./Sidebar/Sidebar */ \"../../components/Sidebar/Sidebar.tsx\");\n/* harmony import */ var _canvases__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./canvases */ \"../../components/canvases/index.tsx\");\n/* harmony import */ var _scene_Renderer__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ../scene/Renderer */ \"../../scene/Renderer.ts\");\n/* harmony import */ var _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ../scene/ShapeCache */ \"../../scene/ShapeCache.ts\");\n/* harmony import */ var _MermaidToExcalidraw__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./MermaidToExcalidraw */ \"../../components/MermaidToExcalidraw.tsx\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst AppContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext(null);\nconst AppPropsContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext(null);\nlet showFourthFont = false; //zsviczian\n\nconst deviceContextInitialValue = {\n isSmScreen: false,\n isMobile: false,\n isTouchScreen: false,\n canDeviceFitSidebar: false,\n isLandscape: false\n};\nconst DeviceContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext(deviceContextInitialValue);\nDeviceContext.displayName = \"DeviceContext\";\nconst ExcalidrawContainerContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext({\n container: null,\n id: null\n});\nExcalidrawContainerContext.displayName = \"ExcalidrawContainerContext\";\nconst ExcalidrawElementsContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext([]);\nExcalidrawElementsContext.displayName = \"ExcalidrawElementsContext\";\nconst ExcalidrawAppStateContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext(Object.assign(Object.assign({}, (0,_appState__WEBPACK_IMPORTED_MODULE_10__.getDefaultAppState)()), {\n width: 0,\n height: 0,\n offsetLeft: 0,\n offsetTop: 0\n}));\nExcalidrawAppStateContext.displayName = \"ExcalidrawAppStateContext\";\nconst ExcalidrawSetAppStateContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext(() => {\n console.warn(\"unitialized ExcalidrawSetAppStateContext context!\");\n});\nExcalidrawSetAppStateContext.displayName = \"ExcalidrawSetAppStateContext\";\nconst ExcalidrawActionManagerContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext(null);\nExcalidrawActionManagerContext.displayName = \"ExcalidrawActionManagerContext\";\nconst useApp = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(AppContext);\nconst useAppProps = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(AppPropsContext);\nconst useDevice = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(DeviceContext);\nconst useExcalidrawContainer = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(ExcalidrawContainerContext);\nconst useExcalidrawElements = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(ExcalidrawElementsContext);\nconst useExcalidrawAppState = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(ExcalidrawAppStateContext);\nconst useExcalidrawSetAppState = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(ExcalidrawSetAppStateContext);\nconst useExcalidrawActionManager = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(ExcalidrawActionManagerContext);\nlet didTapTwice = false;\nlet tappedTwiceTimer = 0;\nlet isHoldingSpace = false;\nlet isPanning = false;\nlet isDraggingScrollBar = false;\nlet currentScrollBars = {\n horizontal: null,\n vertical: null\n};\nlet touchTimeout = 0;\nlet invalidateContextMenu = false;\n/**\r\n * Map of youtube embed video states\r\n */\n\nconst YOUTUBE_VIDEO_STATES = new Map();\nlet IS_PLAIN_PASTE = false;\nlet IS_PLAIN_PASTE_TIMER = 0;\nlet PLAIN_PASTE_TOAST_SHOWN = false;\nlet lastPointerUp = null;\nconst gesture = {\n pointers: new Map(),\n lastCenter: null,\n initialDistance: null,\n initialScale: null\n};\n\nclass App extends (react__WEBPACK_IMPORTED_MODULE_1___default().Component) {\n constructor(props) {\n var _a;\n\n super(props);\n this.interactiveCanvas = null;\n this.unmounted = false;\n this.device = deviceContextInitialValue;\n this.excalidrawContainerRef = react__WEBPACK_IMPORTED_MODULE_1___default().createRef();\n this.files = {};\n this.imageCache = new Map();\n this.iFrameRefs = new Map();\n this.lastPointerDown = null;\n this.lastPointerUp = null;\n this.lastViewportPosition = {\n x: 0,\n y: 0\n };\n this.allowMobileMode = true; //zsviczian\n\n this.updateEmbeddables = () => {\n const embeddableElements = new Map();\n let updated = false;\n this.scene.getNonDeletedElements().filter(element => {\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(element)) {\n embeddableElements.set(element.id, true);\n\n if (element.validated == null) {\n updated = true;\n const validated = (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.embeddableURLValidator)(element.link, this.props.validateEmbeddable);\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n validated\n }, false);\n _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_66__.ShapeCache[\"delete\"](element);\n }\n }\n\n return false;\n });\n\n if (updated) {\n this.scene.informMutation();\n } // GC\n\n\n this.iFrameRefs.forEach((ref, id) => {\n if (!embeddableElements.has(id)) {\n this.iFrameRefs.delete(id);\n }\n });\n };\n\n this.getFrameNameDOMId = frameElement => {\n return `${this.id}-frame-name-${frameElement.id}`;\n };\n\n this.frameNameBoundsCache = {\n get: frameElement => {\n let bounds = this.frameNameBoundsCache._cache.get(frameElement.id);\n\n if (!bounds || bounds.zoom !== this.state.zoom.value || bounds.versionNonce !== frameElement.versionNonce) {\n const frameNameDiv = document.getElementById(this.getFrameNameDOMId(frameElement));\n\n if (frameNameDiv) {\n const box = frameNameDiv.getBoundingClientRect();\n const boxSceneTopLeft = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: box.x,\n clientY: box.y\n }, this.state);\n const boxSceneBottomRight = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: box.right,\n clientY: box.bottom\n }, this.state);\n bounds = {\n x: boxSceneTopLeft.x,\n y: boxSceneTopLeft.y,\n width: boxSceneBottomRight.x - boxSceneTopLeft.x,\n height: boxSceneBottomRight.y - boxSceneTopLeft.y,\n angle: 0,\n zoom: this.state.zoom.value,\n versionNonce: frameElement.versionNonce\n };\n\n this.frameNameBoundsCache._cache.set(frameElement.id, bounds);\n\n return bounds;\n }\n\n return null;\n }\n\n return bounds;\n },\n\n /**\r\n * @private\r\n */\n _cache: new Map()\n };\n\n this.renderFrameNames = () => {\n if (!this.state.frameRendering.enabled || !this.state.frameRendering.name) {\n return null;\n }\n\n const isDarkTheme = this.state.theme === \"dark\";\n return this.scene.getNonDeletedFrames().map((f, index) => {\n if (!(0,_element_sizeHelpers__WEBPACK_IMPORTED_MODULE_27__.isElementInViewport)(f, this.canvas.width / window.devicePixelRatio, this.canvas.height / window.devicePixelRatio, {\n offsetLeft: this.state.offsetLeft,\n offsetTop: this.state.offsetTop,\n scrollX: this.state.scrollX,\n scrollY: this.state.scrollY,\n zoom: this.state.zoom\n })) {\n // if frame not visible, don't render its name\n return null;\n }\n\n const {\n x: x1,\n y: y1\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.sceneCoordsToViewportCoords)({\n sceneX: f.x,\n sceneY: f.y\n }, this.state);\n const {\n x: x2\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.sceneCoordsToViewportCoords)({\n sceneX: f.x + f.width,\n sceneY: f.y + f.height\n }, this.state);\n const FRAME_NAME_GAP = 20;\n const FRAME_NAME_EDIT_PADDING = 6;\n\n const reset = () => {\n var _a;\n\n if (((_a = f.name) === null || _a === void 0 ? void 0 : _a.trim()) === \"\") {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(f, {\n name: null\n });\n }\n\n this.setState({\n editingFrame: null\n });\n };\n\n let frameNameJSX;\n\n if (f.id === this.state.editingFrame) {\n const frameNameInEdit = f.name == null ? `Frame ${(index + 1).toString().padStart(2, \"0\")}` //zsviczian\n : f.name;\n frameNameJSX = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"input\", {\n autoFocus: true,\n value: frameNameInEdit,\n onChange: e => {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(f, {\n name: e.target.value\n });\n },\n onBlur: () => reset(),\n onKeyDown: event => {\n // for some inexplicable reason, `onBlur` triggered on ESC\n // does not reset `state.editingFrame` despite being called,\n // and we need to reset it here as well\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ESCAPE || event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ENTER) {\n reset();\n }\n },\n style: {\n background: this.state.viewBackgroundColor,\n filter: isDarkTheme ? _constants__WEBPACK_IMPORTED_MODULE_12__.THEME_FILTER : \"none\",\n zIndex: 2,\n border: \"none\",\n display: \"block\",\n padding: `${FRAME_NAME_EDIT_PADDING}px`,\n borderRadius: 4,\n boxShadow: \"inset 0 0 0 1px var(--color-primary)\",\n fontFamily: \"Assistant\",\n fontSize: \"14px\",\n transform: `translateY(-${FRAME_NAME_EDIT_PADDING}px)`,\n color: \"var(--color-gray-80)\",\n overflow: \"hidden\",\n maxWidth: `${Math.min(x2 - x1 - FRAME_NAME_EDIT_PADDING, document.body.clientWidth - x1 - FRAME_NAME_EDIT_PADDING)}px`\n },\n size: frameNameInEdit.length + 1 || 1,\n dir: \"auto\",\n autoComplete: \"off\",\n autoCapitalize: \"off\",\n autoCorrect: \"off\"\n });\n } else {\n frameNameJSX = f.name == null || f.name.trim() === \"\" ? `Frame ${(index + 1).toString().padStart(2, \"0\")}` //zsviczian\n : f.name.trim();\n }\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n id: this.getFrameNameDOMId(f),\n style: {\n position: \"absolute\",\n top: `${y1 - FRAME_NAME_GAP - this.state.offsetTop}px`,\n left: `${x1 - this.state.offsetLeft - (this.state.editingFrame === f.id ? FRAME_NAME_EDIT_PADDING : 0)}px`,\n zIndex: 2,\n fontSize: \"14px\",\n color: isDarkTheme ? \"var(--color-gray-60)\" : \"var(--color-gray-50)\",\n width: \"max-content\",\n maxWidth: `${x2 - x1 + FRAME_NAME_EDIT_PADDING * 2}px`,\n overflow: f.id === this.state.editingFrame ? \"visible\" : \"hidden\",\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n cursor: _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.MOVE,\n pointerEvents: this.state.viewModeEnabled ? _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_EVENTS.disabled : _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_EVENTS.enabled\n },\n onPointerDown: event => this.handleCanvasPointerDown(event),\n onWheel: event => this.handleWheel(event),\n onContextMenu: this.handleCanvasContextMenu,\n onDoubleClick: () => {\n this.setState({\n editingFrame: f.id\n });\n }\n }, {\n children: frameNameJSX\n }), f.id);\n });\n };\n\n this.focusContainer = () => {\n var _a;\n\n (_a = this.excalidrawContainerRef.current) === null || _a === void 0 ? void 0 : _a.focus();\n };\n\n this.getSceneElementsIncludingDeleted = () => {\n return this.scene.getElementsIncludingDeleted();\n };\n\n this.getSceneElements = () => {\n return this.scene.getNonDeletedElements();\n };\n\n this.onInsertElements = elements => {\n this.addElementsFromPasteOrLibrary({\n elements,\n position: \"center\",\n files: null\n });\n };\n\n this.onExportImage = async (type, elements) => {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_9__.trackEvent)(\"export\", type, \"ui\");\n const fileHandle = await (0,_data__WEBPACK_IMPORTED_MODULE_13__.exportCanvas)(type, elements, this.state, this.files, {\n exportBackground: this.state.exportBackground,\n name: this.state.name,\n viewBackgroundColor: this.state.viewBackgroundColor\n }).catch(_utils__WEBPACK_IMPORTED_MODULE_33__.muteFSAbortError).catch(error => {\n console.error(error);\n this.setState({\n errorMessage: error.message\n });\n });\n\n if (this.state.exportEmbedScene && fileHandle && (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.isImageFileHandle)(fileHandle)) {\n this.setState({\n fileHandle\n });\n }\n };\n\n this.openEyeDropper = ({\n type\n }) => {\n _jotai__WEBPACK_IMPORTED_MODULE_56__.jotaiStore.set(_EyeDropper__WEBPACK_IMPORTED_MODULE_61__.activeEyeDropperAtom, {\n swapPreviewOnAlt: true,\n colorPickerType: type === \"stroke\" ? \"elementStroke\" : \"elementBackground\",\n onSelect: (color, event) => {\n const shouldUpdateStrokeColor = type === \"background\" && event.altKey || type === \"stroke\" && !event.altKey;\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (!selectedElements.length || this.state.activeTool.type !== \"selection\") {\n if (shouldUpdateStrokeColor) {\n this.syncActionResult({\n appState: Object.assign(Object.assign({}, this.state), {\n currentItemStrokeColor: color\n }),\n commitToHistory: true\n });\n } else {\n this.syncActionResult({\n appState: Object.assign(Object.assign({}, this.state), {\n currentItemBackgroundColor: color\n }),\n commitToHistory: true\n });\n }\n } else {\n this.updateScene({\n elements: this.scene.getElementsIncludingDeleted().map(el => {\n if (this.state.selectedElementIds[el.id]) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(el, {\n [shouldUpdateStrokeColor ? \"strokeColor\" : \"backgroundColor\"]: color\n });\n }\n\n return el;\n })\n });\n }\n },\n keepOpenOnAlt: false\n });\n };\n\n this.syncActionResult = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(actionResult => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n\n if (this.unmounted || actionResult === false) {\n return;\n }\n\n let editingElement = null;\n\n if (actionResult.elements) {\n actionResult.elements.forEach(element => {\n var _a;\n\n if (((_a = this.state.editingElement) === null || _a === void 0 ? void 0 : _a.id) === element.id && this.state.editingElement !== element && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isNonDeletedElement)(element)) {\n editingElement = element;\n }\n });\n this.scene.replaceAllElements(actionResult.elements);\n\n if (actionResult.commitToHistory) {\n this.history.resumeRecording();\n }\n }\n\n if (actionResult.files) {\n this.files = actionResult.replaceFiles ? actionResult.files : Object.assign(Object.assign({}, this.files), actionResult.files);\n this.addNewImagesToImageCache();\n }\n\n if (actionResult.appState || editingElement || this.state.contextMenu) {\n if (actionResult.commitToHistory) {\n this.history.resumeRecording();\n }\n\n let viewModeEnabled = ((_a = actionResult === null || actionResult === void 0 ? void 0 : actionResult.appState) === null || _a === void 0 ? void 0 : _a.viewModeEnabled) || false;\n let zenModeEnabled = ((_b = actionResult === null || actionResult === void 0 ? void 0 : actionResult.appState) === null || _b === void 0 ? void 0 : _b.zenModeEnabled) || false;\n let gridSize = ((_c = actionResult === null || actionResult === void 0 ? void 0 : actionResult.appState) === null || _c === void 0 ? void 0 : _c.gridSize) || null;\n const theme = ((_d = actionResult === null || actionResult === void 0 ? void 0 : actionResult.appState) === null || _d === void 0 ? void 0 : _d.theme) || this.props.theme || _constants__WEBPACK_IMPORTED_MODULE_12__.THEME.LIGHT;\n let name = (_f = (_e = actionResult === null || actionResult === void 0 ? void 0 : actionResult.appState) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : this.state.name;\n const errorMessage = (_h = (_g = actionResult === null || actionResult === void 0 ? void 0 : actionResult.appState) === null || _g === void 0 ? void 0 : _g.errorMessage) !== null && _h !== void 0 ? _h : this.state.errorMessage;\n\n if (typeof this.props.viewModeEnabled !== \"undefined\") {\n viewModeEnabled = this.props.viewModeEnabled;\n }\n\n if (typeof this.props.zenModeEnabled !== \"undefined\") {\n zenModeEnabled = this.props.zenModeEnabled;\n }\n\n if (typeof this.props.gridModeEnabled !== \"undefined\") {\n gridSize = this.props.gridModeEnabled ? _constants__WEBPACK_IMPORTED_MODULE_12__.GRID_SIZE : null;\n }\n\n if (typeof this.props.name !== \"undefined\") {\n name = this.props.name;\n }\n\n editingElement = editingElement || ((_j = actionResult.appState) === null || _j === void 0 ? void 0 : _j.editingElement) || null;\n\n if (editingElement === null || editingElement === void 0 ? void 0 : editingElement.isDeleted) {\n editingElement = null;\n }\n\n this.setState(state => {\n // using Object.assign instead of spread to fool TS 4.2.2+ into\n // regarding the resulting type as not containing undefined\n // (which the following expression will never contain)\n return Object.assign(actionResult.appState || {}, {\n // NOTE this will prevent opening context menu using an action\n // or programmatically from the host, so it will need to be\n // rewritten later\n contextMenu: null,\n editingElement,\n viewModeEnabled,\n zenModeEnabled,\n gridSize,\n theme,\n name,\n errorMessage\n });\n }, () => {\n if (actionResult.syncHistory) {\n this.history.setCurrentState(this.state, this.scene.getElementsIncludingDeleted());\n }\n });\n }\n }); // Lifecycle\n\n this.onBlur = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(() => {\n isHoldingSpace = false;\n this.setState({\n isBindingEnabled: true\n });\n });\n\n this.onUnload = () => {\n this.onBlur();\n };\n\n this.disableEvent = event => {\n event.preventDefault();\n };\n\n this.resetHistory = () => {\n this.history.clear();\n };\n /**\r\n * Resets scene & history.\r\n * ! Do not use to clear scene user action !\r\n */\n\n\n this.resetScene = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(opts => {\n this.scene.replaceAllElements([]);\n this.setState(state => Object.assign(Object.assign({}, (0,_appState__WEBPACK_IMPORTED_MODULE_10__.getDefaultAppState)()), {\n isLoading: (opts === null || opts === void 0 ? void 0 : opts.resetLoadingState) ? false : state.isLoading,\n theme: this.state.theme\n }));\n this.resetHistory();\n });\n\n this.initializeScene = async () => {\n var _a;\n\n if (\"launchQueue\" in window && \"LaunchParams\" in window) {\n window.launchQueue.setConsumer(async launchParams => {\n if (!launchParams.files.length) {\n return;\n }\n\n const fileHandle = launchParams.files[0];\n const blob = await fileHandle.getFile();\n this.loadFileToCanvas(new File([blob], blob.name || \"\", {\n type: blob.type\n }), fileHandle);\n });\n }\n\n if (this.props.theme) {\n this.setState({\n theme: this.props.theme\n });\n }\n\n if (!this.state.isLoading) {\n this.setState({\n isLoading: true\n });\n }\n\n let initialData = null;\n\n try {\n initialData = (await this.props.initialData) || null;\n\n if (initialData === null || initialData === void 0 ? void 0 : initialData.libraryItems) {\n this.library.updateLibrary({\n libraryItems: initialData.libraryItems,\n merge: true\n }).catch(error => {\n console.error(error);\n });\n }\n } catch (error) {\n console.error(error);\n initialData = {\n appState: {\n errorMessage: error.message || \"Encountered an error during importing or restoring scene data\"\n }\n };\n }\n\n const scene = (0,_data_restore__WEBPACK_IMPORTED_MODULE_15__.restore)(initialData, null, null, {\n repairBindings: true\n });\n scene.appState = Object.assign(Object.assign({}, scene.appState), {\n theme: this.props.theme || scene.appState.theme,\n // we're falling back to current (pre-init) state when deciding\n // whether to open the library, to handle a case where we\n // update the state outside of initialData (e.g. when loading the app\n // with a library install link, which should auto-open the library)\n openSidebar: ((_a = scene.appState) === null || _a === void 0 ? void 0 : _a.openSidebar) || this.state.openSidebar,\n activeTool: scene.appState.activeTool.type === \"image\" ? Object.assign(Object.assign({}, scene.appState.activeTool), {\n type: \"selection\"\n }) : scene.appState.activeTool,\n isLoading: false,\n toast: this.state.toast\n });\n\n if (initialData === null || initialData === void 0 ? void 0 : initialData.scrollToContent) {\n scene.appState = Object.assign(Object.assign({}, scene.appState), (0,_scene__WEBPACK_IMPORTED_MODULE_29__.calculateScrollCenter)(scene.elements, Object.assign(Object.assign({}, scene.appState), {\n width: this.state.width,\n height: this.state.height,\n offsetTop: this.state.offsetTop,\n offsetLeft: this.state.offsetLeft\n })));\n } // FontFaceSet loadingdone event we listen on may not always fire\n // (looking at you Safari), so on init we manually load fonts for current\n // text elements on canvas, and rerender them once done. This also\n // seems faster even in browsers that do fire the loadingdone event.\n\n\n this.fonts.loadFontsForElements(scene.elements);\n this.resetHistory();\n this.syncActionResult(Object.assign(Object.assign({}, scene), {\n commitToHistory: true\n }));\n };\n\n this.refreshDeviceState = container => {\n const {\n width,\n height\n } = container.getBoundingClientRect();\n const sidebarBreakpoint = this.props.UIOptions.dockedSidebarBreakpoint != null ? this.props.UIOptions.dockedSidebarBreakpoint : _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_RIGHT_SIDEBAR_MIN_WIDTH;\n this.device = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateObject)(this.device, {\n isLandscape: width > height,\n isSmScreen: width < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_SM_MAX_WIDTH,\n isMobile: this.allowMobileMode && ( //zsviczian\n width < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_WIDTH_PORTRAIT || height < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_HEIGHT_LANDSCAPE && width < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_WIDTH_LANDSCAPE),\n canDeviceFitSidebar: width > sidebarBreakpoint\n });\n };\n\n this.onResize = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(() => {\n this.scene.getElementsIncludingDeleted().forEach(element => _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_66__.ShapeCache[\"delete\"](element));\n this.setState({});\n });\n\n this.renderInteractiveSceneCallback = ({\n atLeastOneVisibleElement,\n scrollBars,\n elements\n }) => {\n if (!document.querySelector(\".excalidraw\")) {\n return;\n } //zsviczian - address issue when moving excalidraw to a new window/document\n\n\n if (scrollBars) {\n currentScrollBars = scrollBars;\n }\n\n const scrolledOutside = // hide when editing text\n (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(this.state.editingElement) ? false : !atLeastOneVisibleElement && elements.length > 0;\n\n if (this.state.scrolledOutside !== scrolledOutside) {\n this.setState({\n scrolledOutside\n });\n }\n\n this.scheduleImageRefresh();\n };\n\n this.onScroll = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.debounce)(() => {\n const {\n offsetTop,\n offsetLeft\n } = this.getCanvasOffsets();\n this.setState(state => {\n if (state.offsetLeft === offsetLeft && state.offsetTop === offsetTop) {\n return null;\n }\n\n return {\n offsetTop,\n offsetLeft\n };\n });\n }, _constants__WEBPACK_IMPORTED_MODULE_12__.SCROLL_TIMEOUT); // Copy/paste\n\n this.onCut = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n var _a;\n\n const isExcalidrawActive = (_a = this.excalidrawContainerRef.current) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement);\n\n if (!isExcalidrawActive || (0,_utils__WEBPACK_IMPORTED_MODULE_33__.isWritableElement)(event.target)) {\n return;\n }\n\n this.cutAll();\n event.preventDefault();\n event.stopPropagation();\n });\n this.onCopy = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n var _a;\n\n const isExcalidrawActive = (_a = this.excalidrawContainerRef.current) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement);\n\n if (!isExcalidrawActive || (0,_utils__WEBPACK_IMPORTED_MODULE_33__.isWritableElement)(event.target)) {\n return;\n }\n\n this.copyAll();\n event.preventDefault();\n event.stopPropagation();\n });\n\n this.cutAll = () => {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionCut, \"keyboard\");\n };\n\n this.copyAll = () => {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionCopy, \"keyboard\");\n };\n\n this.onTouchStart = event => {\n // fix for Apple Pencil Scribble\n // On Android, preventing the event would disable contextMenu on tap-hold\n if (!_constants__WEBPACK_IMPORTED_MODULE_12__.isAndroid) {\n event.preventDefault();\n }\n\n if (!didTapTwice) {\n didTapTwice = true;\n clearTimeout(tappedTwiceTimer);\n tappedTwiceTimer = window.setTimeout(App.resetTapTwice, _constants__WEBPACK_IMPORTED_MODULE_12__.TAP_TWICE_TIMEOUT);\n return;\n } // insert text only if we tapped twice with a single finger\n // event.touches.length === 1 will also prevent inserting text when user's zooming\n\n\n if (didTapTwice && event.touches.length === 1) {\n const touch = event.touches[0]; // @ts-ignore\n\n this.handleCanvasDoubleClick({\n clientX: touch.clientX,\n clientY: touch.clientY\n });\n didTapTwice = false;\n clearTimeout(tappedTwiceTimer);\n }\n\n if (_constants__WEBPACK_IMPORTED_MODULE_12__.isAndroid) {\n event.preventDefault();\n }\n\n if (event.touches.length === 2) {\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n activeEmbeddable: null\n });\n }\n };\n\n this.onTouchEnd = event => {\n this.resetContextMenuTimer();\n\n if (event.touches.length > 0) {\n this.setState({\n previousSelectedElementIds: {},\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(this.state.previousSelectedElementIds, this.state)\n });\n } else {\n gesture.pointers.clear();\n }\n };\n\n this.pasteFromClipboard = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(async event => {\n var _a, _b, _c;\n\n const isPlainPaste = !!(IS_PLAIN_PASTE && event); // #686\n\n const target = document.activeElement;\n const isExcalidrawActive = (_a = this.excalidrawContainerRef.current) === null || _a === void 0 ? void 0 : _a.contains(target);\n\n if (event && !isExcalidrawActive) {\n return;\n }\n\n const elementUnderCursor = document.elementFromPoint(this.lastViewportPosition.x, this.lastViewportPosition.y);\n\n if (event && (!(elementUnderCursor instanceof HTMLCanvasElement) || (0,_utils__WEBPACK_IMPORTED_MODULE_33__.isWritableElement)(target))) {\n return;\n } // must be called in the same frame (thus before any awaits) as the paste\n // event else some browsers (FF...) will clear the clipboardData\n // (something something security)\n\n\n let file = (_b = event === null || event === void 0 ? void 0 : event.clipboardData) === null || _b === void 0 ? void 0 : _b.files[0];\n const data = await (0,_clipboard__WEBPACK_IMPORTED_MODULE_11__.parseClipboard)(event, isPlainPaste);\n\n if (!file && data.text && !isPlainPaste) {\n const string = data.text.trim();\n\n if (string.startsWith(\"<svg\") && string.endsWith(\"</svg>\")) {\n // ignore SVG validation/normalization which will be done during image\n // initialization\n file = (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.SVGStringToFile)(string);\n }\n }\n\n const {\n x: sceneX,\n y: sceneY\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: this.lastViewportPosition.x,\n clientY: this.lastViewportPosition.y\n }, this.state); // prefer spreadsheet data over image file (MS Office/Libre Office)\n\n if ((0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.isSupportedImageFile)(file) && !data.spreadsheet) {\n const imageElement = this.createImageElement({\n sceneX,\n sceneY\n });\n this.insertImageElement(imageElement, file);\n this.initializeImageDimensions(imageElement);\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({\n [imageElement.id]: true\n }, this.state)\n });\n return;\n }\n\n if (this.props.onPaste) {\n try {\n if ((await this.props.onPaste(data, event)) === false) {\n return;\n }\n } catch (error) {\n console.error(error);\n }\n }\n\n if (data.errorMessage) {\n this.setState({\n errorMessage: data.errorMessage\n });\n } else if (data.spreadsheet && !isPlainPaste) {\n this.setState({\n pasteDialog: {\n data: data.spreadsheet,\n shown: true\n }\n });\n } else if (data.elements) {\n const elements = data.programmaticAPI ? (0,_data_transform__WEBPACK_IMPORTED_MODULE_62__.convertToExcalidrawElements)(data.elements) : data.elements; // TODO remove formatting from elements if isPlainPaste\n\n this.addElementsFromPasteOrLibrary({\n elements,\n files: data.files || null,\n position: \"cursor\",\n retainSeed: isPlainPaste\n });\n } else if (data.text) {\n const maybeUrl = (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.extractSrc)(data.text);\n\n if (!isPlainPaste && (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.embeddableURLValidator)(maybeUrl, this.props.validateEmbeddable) && (/^(http|https):\\/\\/[^\\s/$.?#].[^\\s]*$/.test(maybeUrl) || ((_c = (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.getEmbedLink)(maybeUrl)) === null || _c === void 0 ? void 0 : _c.type) === \"video\")) {\n const embeddable = this.insertEmbeddableElement({\n sceneX,\n sceneY,\n link: (0,_data_url__WEBPACK_IMPORTED_MODULE_47__.normalizeLink)(maybeUrl)\n });\n\n if (embeddable) {\n this.setState({\n selectedElementIds: {\n [embeddable.id]: true\n }\n });\n }\n\n return;\n }\n\n this.addTextFromPaste(data.text, isPlainPaste);\n }\n\n this.setActiveTool({\n type: \"selection\"\n });\n event === null || event === void 0 ? void 0 : event.preventDefault();\n });\n\n this.addElementsFromPasteOrLibrary = opts => {\n const elements = (0,_data_restore__WEBPACK_IMPORTED_MODULE_15__.restoreElements)(opts.elements, null, undefined);\n const [minX, minY, maxX, maxY] = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getCommonBounds)(elements);\n const elementsCenterX = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.distance)(minX, maxX) / 2;\n const elementsCenterY = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.distance)(minY, maxY) / 2;\n const clientX = typeof opts.position === \"object\" ? opts.position.clientX : opts.position === \"cursor\" ? this.lastViewportPosition.x : this.state.width / 2 + this.state.offsetLeft;\n const clientY = typeof opts.position === \"object\" ? opts.position.clientY : opts.position === \"cursor\" ? this.lastViewportPosition.y : this.state.height / 2 + this.state.offsetTop;\n const {\n x,\n y\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX,\n clientY\n }, this.state);\n const dx = x - elementsCenterX;\n const dy = y - elementsCenterY;\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(dx, dy, this.state.gridSize);\n const newElements = (0,_element_newElement__WEBPACK_IMPORTED_MODULE_20__.duplicateElements)(elements.map(element => {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(element, {\n x: element.x + gridX - minX,\n y: element.y + gridY - minY\n });\n }), {\n randomizeSeed: !opts.retainSeed\n });\n const nextElements = [...this.scene.getElementsIncludingDeleted(), ...newElements];\n this.scene.replaceAllElements(nextElements);\n newElements.forEach(newElement => {\n if ((0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(newElement) && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBoundToContainer)(newElement)) {\n const container = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getContainerElement)(newElement);\n (0,_element__WEBPACK_IMPORTED_MODULE_16__.redrawTextBoundingBox)(newElement, container);\n }\n });\n\n if (opts.files) {\n this.files = Object.assign(Object.assign({}, this.files), opts.files);\n }\n\n this.history.resumeRecording();\n const nextElementsToSelect = (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.excludeElementsInFramesFromSelection)(newElements);\n this.setState(Object.assign(Object.assign(Object.assign({}, this.state), {\n // keep sidebar (presumably the library) open if it's docked and\n // can fit.\n //\n // Note, we should close the sidebar only if we're dropping items\n // from library, not when pasting from clipboard. Alas.\n openSidebar: this.state.openSidebar && this.device.canDeviceFitSidebar && _jotai__WEBPACK_IMPORTED_MODULE_56__.jotaiStore.get(_Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_63__.isSidebarDockedAtom) ? this.state.openSidebar : null\n }), (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: null,\n selectedElementIds: nextElementsToSelect.reduce((acc, element) => {\n if (!(0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBoundToContainer)(element)) {\n acc[element.id] = true;\n }\n\n return acc;\n }, {})\n }, this.scene.getNonDeletedElements(), this.state, this)), () => {\n if (opts.files) {\n this.addNewImagesToImageCache();\n }\n });\n this.setActiveTool({\n type: \"selection\"\n });\n\n if (opts.fitToContent) {\n this.scrollToContent(newElements, {\n fitToContent: true\n });\n }\n };\n\n this.setAppState = (state, callback) => {\n this.setState(state, callback);\n };\n\n this.removePointer = event => {\n if (touchTimeout) {\n this.resetContextMenuTimer();\n }\n\n gesture.pointers.delete(event.pointerId);\n };\n\n this.toggleLock = (source = \"ui\") => {\n if (!this.state.activeTool.locked) {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_9__.trackEvent)(\"toolbar\", \"toggleLock\", `${source} (${this.device.isMobile ? \"mobile\" : \"desktop\"})`);\n }\n\n this.setState(prevState => {\n return {\n activeTool: Object.assign(Object.assign(Object.assign({}, prevState.activeTool), (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, prevState.activeTool.locked ? {\n type: \"selection\"\n } : prevState.activeTool)), {\n locked: !prevState.activeTool.locked\n })\n };\n });\n };\n\n this.updateFrameRendering = opts => {\n this.setState(prevState => {\n var _a, _b, _c, _d;\n\n const next = typeof opts === \"function\" ? opts(prevState.frameRendering) : opts;\n return {\n frameRendering: {\n enabled: (_a = next === null || next === void 0 ? void 0 : next.enabled) !== null && _a !== void 0 ? _a : prevState.frameRendering.enabled,\n clip: (_b = next === null || next === void 0 ? void 0 : next.clip) !== null && _b !== void 0 ? _b : prevState.frameRendering.clip,\n name: (_c = next === null || next === void 0 ? void 0 : next.name) !== null && _c !== void 0 ? _c : prevState.frameRendering.name,\n outline: (_d = next === null || next === void 0 ? void 0 : next.outline) !== null && _d !== void 0 ? _d : prevState.frameRendering.outline\n }\n };\n });\n };\n\n this.togglePenMode = () => {\n this.setState(prevState => {\n return {\n penMode: !prevState.penMode\n };\n });\n };\n\n this.onHandToolToggle = () => {\n this.actionManager.executeAction(_actions_actionCanvas__WEBPACK_IMPORTED_MODULE_55__.actionToggleHandTool);\n };\n /**\r\n * Zooms on canvas viewport center\r\n */\n\n\n this.zoomCanvas = (\n /** decimal fraction between 0.1 (10% zoom) and 30 (3000% zoom) */\n value) => {\n this.setState(Object.assign({}, (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_31__.getStateForZoom)({\n viewportX: this.state.width / 2 + this.state.offsetLeft,\n viewportY: this.state.height / 2 + this.state.offsetTop,\n nextZoom: (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getNormalizedZoom)(value)\n }, this.state)));\n };\n\n this.cancelInProgresAnimation = null;\n\n this.scrollToContent = (target = this.scene.getNonDeletedElements(), opts) => {\n var _a, _b;\n\n (_a = this.cancelInProgresAnimation) === null || _a === void 0 ? void 0 : _a.call(this); // convert provided target into ExcalidrawElement[] if necessary\n\n const targetElements = Array.isArray(target) ? target : [target];\n let zoom = this.state.zoom;\n let scrollX = this.state.scrollX;\n let scrollY = this.state.scrollY;\n\n if ((opts === null || opts === void 0 ? void 0 : opts.fitToContent) || (opts === null || opts === void 0 ? void 0 : opts.fitToViewport)) {\n const {\n appState\n } = (0,_actions_actionCanvas__WEBPACK_IMPORTED_MODULE_55__.zoomToFit)({\n targetElements,\n appState: this.state,\n fitToViewport: !!(opts === null || opts === void 0 ? void 0 : opts.fitToViewport),\n viewportZoomFactor: opts === null || opts === void 0 ? void 0 : opts.viewportZoomFactor\n });\n zoom = appState.zoom;\n scrollX = appState.scrollX;\n scrollY = appState.scrollY;\n } else {\n // compute only the viewport location, without any zoom adjustment\n const scroll = (0,_scene__WEBPACK_IMPORTED_MODULE_29__.calculateScrollCenter)(targetElements, this.state);\n scrollX = scroll.scrollX;\n scrollY = scroll.scrollY;\n } // when animating, we use RequestAnimationFrame to prevent the animation\n // from slowing down other processes\n\n\n if (opts === null || opts === void 0 ? void 0 : opts.animate) {\n const origScrollX = this.state.scrollX;\n const origScrollY = this.state.scrollY;\n const origZoom = this.state.zoom.value;\n const cancel = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.easeToValuesRAF)({\n fromValues: {\n scrollX: origScrollX,\n scrollY: origScrollY,\n zoom: origZoom\n },\n toValues: {\n scrollX,\n scrollY,\n zoom: zoom.value\n },\n interpolateValue: (from, to, progress, key) => {\n // for zoom, use different easing\n if (key === \"zoom\") {\n return from * Math.pow(to / from, (0,_utils__WEBPACK_IMPORTED_MODULE_33__.easeOut)(progress));\n } // handle using default\n\n\n return undefined;\n },\n onStep: ({\n scrollX,\n scrollY,\n zoom\n }) => {\n this.setState({\n scrollX,\n scrollY,\n zoom: {\n value: zoom\n }\n });\n },\n onStart: () => {\n this.setState({\n shouldCacheIgnoreZoom: true\n });\n },\n onEnd: () => {\n this.setState({\n shouldCacheIgnoreZoom: false\n });\n },\n onCancel: () => {\n this.setState({\n shouldCacheIgnoreZoom: false\n });\n },\n duration: (_b = opts === null || opts === void 0 ? void 0 : opts.duration) !== null && _b !== void 0 ? _b : 500\n });\n\n this.cancelInProgresAnimation = () => {\n cancel();\n this.cancelInProgresAnimation = null;\n };\n } else {\n this.setState({\n scrollX,\n scrollY,\n zoom\n });\n }\n };\n /** use when changing scrollX/scrollY/zoom based on user interaction */\n\n\n this.translateCanvas = state => {\n var _a;\n\n (_a = this.cancelInProgresAnimation) === null || _a === void 0 ? void 0 : _a.call(this);\n this.setState(state);\n }; //zsviczian\n\n\n this.zoomToFit = (target = this.scene.getNonDeletedElements(), maxZoom = 1, //null will zoom to max based on viewport\n margin = 0.03) => {\n if (!target) {\n target = this.scene.getNonDeletedElements();\n }\n\n if (target.length === 0) {\n maxZoom = 1;\n }\n\n this.setState((0,_actions_actionCanvas__WEBPACK_IMPORTED_MODULE_55__.zoomToFitElements)(target, this.state, false, this, maxZoom, margin).appState);\n }; //zsviczian\n\n\n this.startLineEditor = (el, selectedPointsIndices = null) => {\n if (!el || !(0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(el)) {\n return;\n }\n\n const editingLinearElement = new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(el, this.scene);\n this.setState({\n selectedLinearElement: editingLinearElement,\n editingLinearElement: Object.assign(Object.assign({}, editingLinearElement), {\n selectedPointsIndices\n })\n });\n }; //zsviczian\n\n\n this.updateContainerSize = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(containers => {\n containers.forEach(el => {\n const [x, y] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.rotate)(el.x + el.width, el.y + el.height, el.x + el.width / 2, el.y + el.height / 2, el.angle);\n (0,_element_resizeElements__WEBPACK_IMPORTED_MODULE_45__.resizeSingleElement)(new Map().set(el.id, el), false, el, \"se\", true, x, y);\n });\n });\n\n this.setToast = toast => {\n this.setState({\n toast\n });\n };\n\n this.restoreFileFromShare = async () => {\n try {\n const webShareTargetCache = await caches.open(\"web-share-target\");\n const response = await webShareTargetCache.match(\"shared-file\");\n\n if (response) {\n const blob = await response.blob();\n const file = new File([blob], blob.name || \"\", {\n type: blob.type\n });\n this.loadFileToCanvas(file, null);\n await webShareTargetCache.delete(\"shared-file\");\n window.history.replaceState(null, _constants__WEBPACK_IMPORTED_MODULE_12__.APP_NAME, window.location.pathname);\n }\n } catch (error) {\n this.setState({\n errorMessage: error.message\n });\n }\n };\n /** adds supplied files to existing files in the appState */\n\n\n this.addFiles = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(files => {\n const filesMap = files.reduce((acc, fileData) => {\n acc.set(fileData.id, fileData);\n return acc;\n }, new Map());\n this.files = Object.assign(Object.assign({}, this.files), Object.fromEntries(filesMap));\n this.scene.getNonDeletedElements().forEach(element => {\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isInitializedImageElement)(element) && filesMap.has(element.fileId)) {\n this.imageCache.delete(element.fileId);\n _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_66__.ShapeCache[\"delete\"](element);\n }\n });\n this.scene.informMutation();\n this.addNewImagesToImageCache();\n }); //zsviczian https://github.com/zsviczian/excalibrain/issues/9\n\n this.setMobileModeAllowed = allow => {\n const {\n width,\n height\n } = this.excalidrawContainerRef.current.getBoundingClientRect();\n this.allowMobileMode = allow;\n\n if (allow) {\n this.device = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateObject)(this.device, {\n isMobile: width < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_WIDTH_PORTRAIT || height < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_HEIGHT_LANDSCAPE && width < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_WIDTH_LANDSCAPE\n });\n } else {\n this.device = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateObject)(this.device, {\n isMobile: false\n });\n }\n\n this.forceUpdate();\n }; //zsviczian\n\n\n this.setLocalFont = showOnPanel => {\n showFourthFont = showOnPanel;\n };\n\n this.selectElements = elements => {\n this.updateScene({\n appState: Object.assign(Object.assign({}, this.state), {\n editingGroupId: null,\n selectedElementIds: elements.reduce((map, element) => {\n map[element.id] = true;\n return map;\n }, {})\n }),\n commitToHistory: true\n });\n };\n\n this.bringToFront = elements => {\n this.selectElements(elements);\n this.updateScene(_actions__WEBPACK_IMPORTED_MODULE_5__.actionBringToFront.perform(this.scene.getNonDeletedElements(), this.state));\n };\n\n this.bringForward = elements => {\n this.selectElements(elements);\n this.updateScene(_actions__WEBPACK_IMPORTED_MODULE_5__.actionBringForward.perform(this.scene.getNonDeletedElements(), this.state));\n };\n\n this.sendToBack = elements => {\n this.selectElements(elements);\n this.updateScene(_actions__WEBPACK_IMPORTED_MODULE_5__.actionSendToBack.perform(this.scene.getNonDeletedElements(), this.state));\n };\n\n this.sendBackward = elements => {\n this.selectElements(elements);\n this.updateScene(_actions__WEBPACK_IMPORTED_MODULE_5__.actionSendBackward.perform(this.scene.getNonDeletedElements(), this.state));\n };\n\n this.updateScene = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(sceneData => {\n if (sceneData.commitToHistory) {\n this.history.resumeRecording();\n }\n\n (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.flushSync)(() => {\n if (sceneData.appState) {\n this.setState(sceneData.appState);\n }\n });\n\n if (sceneData.elements) {\n this.scene.replaceAllElements(sceneData.elements);\n }\n\n if (sceneData.collaborators) {\n this.setState({\n collaborators: sceneData.collaborators\n });\n }\n });\n\n this.onSceneUpdated = () => {\n this.setState({});\n };\n /**\r\n * @returns whether the menu was toggled on or off\r\n */\n\n\n this.toggleSidebar = ({\n name,\n tab,\n force\n }) => {\n var _a;\n\n let nextName;\n\n if (force === undefined) {\n nextName = ((_a = this.state.openSidebar) === null || _a === void 0 ? void 0 : _a.name) === name ? null : name;\n } else {\n nextName = force ? name : null;\n }\n\n this.setState({\n openSidebar: nextName ? {\n name: nextName,\n tab\n } : null\n });\n return !!nextName;\n };\n\n this.updateCurrentCursorPosition = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n this.lastViewportPosition.x = event.clientX;\n this.lastViewportPosition.y = event.clientY;\n }); // Input handling\n\n this.onKeyDown = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n // normalize `event.key` when CapsLock is pressed #2372\n if (\"Proxy\" in window && (!event.shiftKey && /^[A-Z]$/.test(event.key) || event.shiftKey && /^[a-z]$/.test(event.key))) {\n event = new Proxy(event, {\n get(ev, prop) {\n const value = ev[prop];\n\n if (typeof value === \"function\") {\n // fix for Proxies hijacking `this`\n return value.bind(ev);\n }\n\n return prop === \"key\" ? // CapsLock inverts capitalization based on ShiftKey, so invert\n // it back\n event.shiftKey ? ev.key.toUpperCase() : ev.key.toLowerCase() : value;\n }\n\n });\n }\n\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && event.key.toLowerCase() === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.V) {\n IS_PLAIN_PASTE = event.shiftKey;\n clearTimeout(IS_PLAIN_PASTE_TIMER); // reset (100ms to be safe that we it runs after the ensuing\n // paste event). Though, technically unnecessary to reset since we\n // (re)set the flag before each paste event.\n\n IS_PLAIN_PASTE_TIMER = window.setTimeout(() => {\n IS_PLAIN_PASTE = false;\n }, 100);\n } // prevent browser zoom in input fields\n\n\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && (0,_utils__WEBPACK_IMPORTED_MODULE_33__.isWritableElement)(event.target)) {\n if (event.code === _keys__WEBPACK_IMPORTED_MODULE_26__.CODES.MINUS || event.code === _keys__WEBPACK_IMPORTED_MODULE_26__.CODES.EQUAL) {\n event.preventDefault();\n return;\n }\n } // bail if\n\n\n if ( // inside an input\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.isWritableElement)(event.target) && // unless pressing escape (finalize action)\n event.key !== _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ESCAPE || // or unless using arrows (to move between buttons)\n (0,_keys__WEBPACK_IMPORTED_MODULE_26__.isArrowKey)(event.key) && (0,_utils__WEBPACK_IMPORTED_MODULE_33__.isInputLike)(event.target)) {\n return;\n }\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.QUESTION_MARK) {\n this.setState({\n openDialog: \"help\"\n });\n return;\n } else if (event.key.toLowerCase() === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.E && event.shiftKey && event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) {\n event.preventDefault();\n this.setState({\n openDialog: \"imageExport\"\n });\n return;\n }\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.PAGE_UP || event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.PAGE_DOWN) {\n let offset = (event.shiftKey ? this.state.width : this.state.height) / this.state.zoom.value;\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.PAGE_DOWN) {\n offset = -offset;\n }\n\n if (event.shiftKey) {\n this.translateCanvas(state => ({\n scrollX: state.scrollX + offset\n }));\n } else {\n this.translateCanvas(state => ({\n scrollY: state.scrollY + offset\n }));\n }\n }\n\n if (this.actionManager.handleKeyDown(event)) {\n return;\n }\n\n if (this.state.viewModeEnabled) {\n return;\n }\n\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && this.state.isBindingEnabled) {\n this.setState({\n isBindingEnabled: false\n });\n }\n\n if ((0,_keys__WEBPACK_IMPORTED_MODULE_26__.isArrowKey)(event.key)) {\n const step = this.state.gridSize && (event.shiftKey ? _constants__WEBPACK_IMPORTED_MODULE_12__.ELEMENT_TRANSLATE_AMOUNT : this.state.gridSize) || (event.shiftKey ? _constants__WEBPACK_IMPORTED_MODULE_12__.ELEMENT_SHIFT_TRANSLATE_AMOUNT : _constants__WEBPACK_IMPORTED_MODULE_12__.ELEMENT_TRANSLATE_AMOUNT);\n let offsetX = 0;\n let offsetY = 0;\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ARROW_LEFT) {\n offsetX = -step;\n } else if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ARROW_RIGHT) {\n offsetX = step;\n } else if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ARROW_UP) {\n offsetY = -step;\n } else if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ARROW_DOWN) {\n offsetY = step;\n }\n\n const selectedElements = this.scene.getSelectedElements({\n selectedElementIds: this.state.selectedElementIds,\n includeBoundTextElement: true,\n includeElementsInFrames: true\n });\n selectedElements.forEach(element => {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n x: element.x + offsetX,\n y: element.y + offsetY\n });\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.updateBoundElements)(element, {\n simultaneouslyUpdated: selectedElements\n });\n });\n this.maybeSuggestBindingForAll(selectedElements);\n event.preventDefault();\n } else if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ENTER) {\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (selectedElements.length === 1) {\n const selectedElement = selectedElements[0];\n\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) {\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(selectedElement)) {\n if (!this.state.editingLinearElement || this.state.editingLinearElement.elementId !== selectedElements[0].id) {\n this.history.resumeRecording();\n this.setState({\n editingLinearElement: new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(selectedElement, this.scene)\n });\n }\n }\n } else if ((0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(selectedElement) || (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.isValidTextContainer)(selectedElement)) {\n let container;\n\n if (!(0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(selectedElement)) {\n container = selectedElement;\n }\n\n const midPoint = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getContainerCenter)(selectedElement, this.state);\n const sceneX = midPoint.x;\n const sceneY = midPoint.y;\n this.startTextEditing({\n sceneX,\n sceneY,\n container\n });\n event.preventDefault();\n return;\n } else if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isFrameElement)(selectedElement)) {\n this.setState({\n editingFrame: selectedElement.id\n });\n }\n }\n } else if (!event.ctrlKey && !event.altKey && !event.metaKey && this.state.draggingElement === null) {\n const shape = (0,_shapes__WEBPACK_IMPORTED_MODULE_32__.findShapeByKey)(event.key);\n\n if (shape) {\n if (this.state.activeTool.type !== shape) {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_9__.trackEvent)(\"toolbar\", shape, `keyboard (${this.device.isMobile ? \"mobile\" : \"desktop\"})`);\n }\n\n this.setActiveTool({\n type: shape\n });\n event.stopPropagation();\n } else if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.Q) {\n this.toggleLock(\"keyboard\");\n event.stopPropagation();\n }\n }\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.SPACE && gesture.pointers.size === 0) {\n isHoldingSpace = true;\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRAB);\n event.preventDefault();\n }\n\n if ((event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.G || event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.S) && !event.altKey && !event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) {\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (this.state.activeTool.type === \"selection\" && !selectedElements.length) {\n return;\n }\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.G && ((0,_scene__WEBPACK_IMPORTED_MODULE_29__.hasBackground)(this.state.activeTool.type) || selectedElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_29__.hasBackground)(element.type)))) {\n this.setState({\n openPopup: \"elementBackground\"\n });\n event.stopPropagation();\n }\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.S) {\n this.setState({\n openPopup: \"elementStroke\"\n });\n event.stopPropagation();\n }\n }\n\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.BACKSPACE || event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.DELETE)) {\n _jotai__WEBPACK_IMPORTED_MODULE_56__.jotaiStore.set(_ActiveConfirmDialog__WEBPACK_IMPORTED_MODULE_57__.activeConfirmDialogAtom, \"clearCanvas\");\n } // eye dropper\n // -----------------------------------------------------------------------\n\n\n const lowerCased = event.key.toLocaleLowerCase();\n const isPickingStroke = lowerCased === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.S && event.shiftKey;\n const isPickingBackground = event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.I || lowerCased === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.G && event.shiftKey;\n\n if (isPickingStroke || isPickingBackground) {\n this.openEyeDropper({\n type: isPickingStroke ? \"stroke\" : \"background\"\n });\n } // -----------------------------------------------------------------------\n\n });\n this.onWheel = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n // prevent browser pinch zoom on DOM elements\n if (!(event.target instanceof HTMLCanvasElement) && event.ctrlKey) {\n event.preventDefault();\n }\n });\n this.onKeyUp = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.SPACE) {\n if (this.state.viewModeEnabled) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRAB);\n } else if (this.state.activeTool.type === \"selection\") {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n selectedGroupIds: {},\n editingGroupId: null,\n activeEmbeddable: null\n });\n }\n\n isHoldingSpace = false;\n }\n\n if (!event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && !this.state.isBindingEnabled) {\n this.setState({\n isBindingEnabled: true\n });\n }\n\n if ((0,_keys__WEBPACK_IMPORTED_MODULE_26__.isArrowKey)(event.key)) {\n const selectedElements = this.scene.getSelectedElements(this.state);\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.isBindingEnabled)(this.state) ? (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.bindOrUnbindSelectedElements)(selectedElements) : (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.unbindLinearElements)(selectedElements);\n this.setState({\n suggestedBindings: []\n });\n }\n });\n\n this.setActiveTool = tool => {\n const nextActiveTool = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, tool);\n\n if (nextActiveTool.type === \"hand\") {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRAB);\n } else if (!isHoldingSpace) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n }\n\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_33__.isToolIcon)(document.activeElement)) {\n this.focusContainer();\n }\n\n if (!(0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElementType)(nextActiveTool.type)) {\n this.setState({\n suggestedBindings: []\n });\n }\n\n if (nextActiveTool.type === \"image\") {\n this.onImageAction();\n }\n\n if (nextActiveTool.type !== \"selection\") {\n this.setState(prevState => ({\n activeTool: nextActiveTool,\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(nextActiveTool.type === \"mermaid\" //zsviczian\n ? this.state.selectedElementIds : {}, this.state),\n selectedGroupIds: {},\n editingGroupId: null,\n snapLines: [],\n originSnapOffset: null\n }));\n } else {\n this.setState({\n activeTool: nextActiveTool,\n snapLines: [],\n originSnapOffset: null,\n activeEmbeddable: null\n });\n }\n };\n\n this.setCursor = cursor => {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, cursor);\n };\n\n this.resetCursor = () => {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n };\n /**\r\n * returns whether user is making a gesture with >= 2 fingers (points)\r\n * on o touch screen (not on a trackpad). Currently only relates to Darwin\r\n * (iOS/iPadOS,MacOS), but may work on other devices in the future if\r\n * GestureEvent is standardized.\r\n */\n\n\n this.isTouchScreenMultiTouchGesture = () => {\n // we don't want to deselect when using trackpad, and multi-point gestures\n // only work on touch screens, so checking for >= pointers means we're on a\n // touchscreen\n return gesture.pointers.size >= 2;\n }; // fires only on Safari\n\n\n this.onGestureStart = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n event.preventDefault(); // we only want to deselect on touch screens because user may have selected\n // elements by mistake while zooming\n\n if (this.isTouchScreenMultiTouchGesture()) {\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n activeEmbeddable: null\n });\n }\n\n gesture.initialScale = this.state.zoom.value;\n }); // fires only on Safari\n\n this.onGestureChange = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n event.preventDefault(); // onGestureChange only has zoom factor but not the center.\n // If we're on iPad or iPhone, then we recognize multi-touch and will\n // zoom in at the right location in the touchmove handler\n // (handleCanvasPointerMove).\n //\n // On Macbook trackpad, we don't have those events so will zoom in at the\n // current location instead.\n //\n // As such, bail from this handler on touch devices.\n\n if (this.isTouchScreenMultiTouchGesture()) {\n return;\n }\n\n const initialScale = gesture.initialScale;\n\n if (initialScale) {\n this.setState(state => Object.assign({}, (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_31__.getStateForZoom)({\n viewportX: this.lastViewportPosition.x,\n viewportY: this.lastViewportPosition.y,\n nextZoom: (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getNormalizedZoom)(initialScale * event.scale)\n }, state)));\n }\n }); // fires only on Safari\n\n this.onGestureEnd = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n event.preventDefault(); // reselect elements only on touch screens (see onGestureStart)\n\n if (this.isTouchScreenMultiTouchGesture()) {\n this.setState({\n previousSelectedElementIds: {},\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(this.state.previousSelectedElementIds, this.state)\n });\n }\n\n gesture.initialScale = null;\n });\n\n this.startTextEditing = ({\n sceneX,\n sceneY,\n insertAtParentCenter = true,\n container\n }) => {\n var _a, _b;\n\n let shouldBindToContainer = false;\n let parentCenterPosition = insertAtParentCenter && this.getTextWysiwygSnappedToCenterPosition(sceneX, sceneY, this.state, container);\n\n if (container && parentCenterPosition) {\n const boundTextElementToContainer = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getBoundTextElement)(container);\n\n if (!boundTextElementToContainer) {\n shouldBindToContainer = true;\n }\n }\n\n let existingTextElement = null;\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (selectedElements.length === 1) {\n if ((0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(selectedElements[0])) {\n existingTextElement = selectedElements[0];\n } else if (container) {\n existingTextElement = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getBoundTextElement)(selectedElements[0]);\n } else {\n existingTextElement = this.getTextElementAtPosition(sceneX, sceneY);\n }\n } else {\n existingTextElement = this.getTextElementAtPosition(sceneX, sceneY);\n }\n\n const fontFamily = (existingTextElement === null || existingTextElement === void 0 ? void 0 : existingTextElement.fontFamily) || this.state.currentItemFontFamily;\n const lineHeight = (existingTextElement === null || existingTextElement === void 0 ? void 0 : existingTextElement.lineHeight) || (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getDefaultLineHeight)(fontFamily);\n const fontSize = this.state.currentItemFontSize;\n\n if (!existingTextElement && shouldBindToContainer && container && !(0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isArrowElement)(container)) {\n const fontString = {\n fontSize,\n fontFamily\n };\n const minWidth = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getApproxMinLineWidth)((0,_utils__WEBPACK_IMPORTED_MODULE_33__.getFontString)(fontString), lineHeight);\n const minHeight = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getApproxMinLineHeight)(fontSize, lineHeight);\n const newHeight = Math.max(container.height, minHeight);\n const newWidth = Math.max(container.width, minWidth);\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(container, {\n height: newHeight,\n width: newWidth\n });\n sceneX = container.x + newWidth / 2;\n sceneY = container.y + newHeight / 2;\n\n if (parentCenterPosition) {\n parentCenterPosition = this.getTextWysiwygSnappedToCenterPosition(sceneX, sceneY, this.state, container);\n }\n }\n\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords({\n x: sceneX,\n y: sceneY\n });\n const element = existingTextElement ? existingTextElement : (0,_element__WEBPACK_IMPORTED_MODULE_16__.newTextElement)({\n x: parentCenterPosition ? parentCenterPosition.elementCenterX : sceneX,\n y: parentCenterPosition ? parentCenterPosition.elementCenterY : sceneY,\n strokeColor: this.state.currentItemStrokeColor,\n backgroundColor: this.state.currentItemBackgroundColor,\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roughness: this.state.currentItemRoughness,\n opacity: this.state.currentItemOpacity,\n text: \"\",\n rawText: \"\",\n fontSize,\n fontFamily,\n textAlign: parentCenterPosition ? \"center\" : this.state.currentItemTextAlign,\n verticalAlign: parentCenterPosition ? _constants__WEBPACK_IMPORTED_MODULE_12__.VERTICAL_ALIGN.MIDDLE : _constants__WEBPACK_IMPORTED_MODULE_12__.DEFAULT_VERTICAL_ALIGN,\n containerId: shouldBindToContainer ? container === null || container === void 0 ? void 0 : container.id : undefined,\n groupIds: (_a = container === null || container === void 0 ? void 0 : container.groupIds) !== null && _a !== void 0 ? _a : [],\n lineHeight,\n angle: (_b = container === null || container === void 0 ? void 0 : container.angle) !== null && _b !== void 0 ? _b : 0,\n frameId: topLayerFrame ? topLayerFrame.id : null\n });\n\n if (!existingTextElement && shouldBindToContainer && container) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(container, {\n boundElements: (container.boundElements || []).concat({\n type: \"text\",\n id: element.id\n })\n });\n }\n\n this.setState({\n editingElement: element\n });\n\n if (!existingTextElement) {\n if (container && shouldBindToContainer) {\n const containerIndex = this.scene.getElementIndex(container.id);\n this.scene.insertElementAtIndex(element, containerIndex + 1);\n } else {\n this.scene.addNewElement(element);\n }\n }\n\n this.setState({\n editingElement: element\n });\n this.handleTextWysiwyg(element, {\n isExistingElement: !!existingTextElement\n });\n };\n\n this.handleCanvasDoubleClick = event => {\n // case: double-clicking with arrow/line tool selected would both create\n // text and enter multiElement mode\n if (this.state.multiElement) {\n return;\n } // we should only be able to double click when mode is selection\n\n\n if (this.state.activeTool.type !== \"selection\") {\n return;\n }\n\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (selectedElements.length === 1 && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(selectedElements[0])) {\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && (!this.state.editingLinearElement || this.state.editingLinearElement.elementId !== selectedElements[0].id)) {\n this.history.resumeRecording();\n this.setState({\n editingLinearElement: new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(selectedElements[0], this.scene)\n });\n return;\n } else if (this.state.editingLinearElement && this.state.editingLinearElement.elementId === selectedElements[0].id) {\n return;\n }\n }\n\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n let {\n x: sceneX,\n y: sceneY\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n const selectedGroupIds = (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getSelectedGroupIds)(this.state);\n\n if (selectedGroupIds.length > 0) {\n const hitElement = this.getElementAtPosition(sceneX, sceneY);\n const selectedGroupId = hitElement && (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getSelectedGroupIdForElement)(hitElement, this.state.selectedGroupIds);\n\n if (selectedGroupId) {\n this.setState(prevState => Object.assign(Object.assign({}, prevState), (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: selectedGroupId,\n selectedElementIds: {\n [hitElement.id]: true\n }\n }, this.scene.getNonDeletedElements(), prevState, this)));\n return;\n }\n }\n\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n\n if (!event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && !this.state.viewModeEnabled) {\n const hitElement = this.getElementAtPosition(sceneX, sceneY);\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement)) {\n this.setState({\n activeEmbeddable: {\n element: hitElement,\n state: \"active\"\n }\n });\n return;\n }\n\n const container = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getTextBindableContainerAtPosition)(this.scene.getNonDeletedElements(), this.state, sceneX, sceneY);\n\n if (container) {\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.hasBoundTextElement)(container) || !(0,_utils__WEBPACK_IMPORTED_MODULE_33__.isTransparent)(container.backgroundColor) || (0,_element_collision__WEBPACK_IMPORTED_MODULE_44__.isHittingElementNotConsideringBoundingBox)(container, this.state, this.frameNameBoundsCache, [sceneX, sceneY])) {\n const midPoint = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getContainerCenter)(container, this.state);\n sceneX = midPoint.x;\n sceneY = midPoint.y;\n }\n }\n\n this.startTextEditing({\n sceneX,\n sceneY,\n insertAtParentCenter: !event.altKey,\n container\n });\n }\n };\n\n this.getElementLinkAtPosition = (scenePointer, hitElement) => {\n // Reversing so we traverse the elements in decreasing order\n // of z-index\n const elements = this.scene.getNonDeletedElements().slice().reverse();\n let hitElementIndex = Infinity;\n return elements.find((element, index) => {\n if (hitElement && element.id === hitElement.id) {\n hitElementIndex = index;\n }\n\n return element.link && index <= hitElementIndex && (0,_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.isPointHittingLink)(element, this.state, [scenePointer.x, scenePointer.y], this.device.isMobile);\n });\n };\n\n this.redirectToLink = (event, isTouchScreen) => {\n const draggedDistance = (0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(this.lastPointerDown.clientX, this.lastPointerDown.clientY, this.lastPointerUp.clientX, this.lastPointerUp.clientY);\n\n if (!this.hitLinkElement || // For touch screen allow dragging threshold else strict check\n isTouchScreen && draggedDistance > _constants__WEBPACK_IMPORTED_MODULE_12__.DRAGGING_THRESHOLD || !isTouchScreen && draggedDistance !== 0) {\n return;\n }\n\n const lastPointerDownCoords = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(this.lastPointerDown, this.state);\n const lastPointerDownHittingLinkIcon = (0,_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.isPointHittingLink)(this.hitLinkElement, this.state, [lastPointerDownCoords.x, lastPointerDownCoords.y], this.device.isMobile);\n const lastPointerUpCoords = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(this.lastPointerUp, this.state);\n const lastPointerUpHittingLinkIcon = (0,_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.isPointHittingLink)(this.hitLinkElement, this.state, [lastPointerUpCoords.x, lastPointerUpCoords.y], this.device.isMobile);\n\n if (lastPointerDownHittingLinkIcon && lastPointerUpHittingLinkIcon) {\n let url = this.hitLinkElement.link;\n\n if (url) {\n url = (0,_data_url__WEBPACK_IMPORTED_MODULE_47__.normalizeLink)(url);\n let customEvent;\n\n if (this.props.onLinkOpen) {\n customEvent = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.wrapEvent)(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.EXCALIDRAW_LINK, event.nativeEvent);\n this.props.onLinkOpen(Object.assign(Object.assign({}, this.hitLinkElement), {\n link: url\n }), customEvent);\n }\n\n if (!(customEvent === null || customEvent === void 0 ? void 0 : customEvent.defaultPrevented)) {\n const target = (0,_data_url__WEBPACK_IMPORTED_MODULE_47__.isLocalLink)(url) ? \"_self\" : \"_blank\";\n const newWindow = window.open(undefined, target); // https://mathiasbynens.github.io/rel-noopener/\n\n if (newWindow) {\n newWindow.opener = null;\n newWindow.location = url;\n }\n }\n }\n }\n };\n\n this.getTopLayerFrameAtSceneCoords = sceneCoords => {\n const frames = this.scene.getNonDeletedFrames().filter(frame => (0,_frame__WEBPACK_IMPORTED_MODULE_51__.isCursorInFrame)(sceneCoords, frame));\n return frames.length ? frames[frames.length - 1] : null;\n };\n\n this.handleCanvasPointerMove = event => {\n var _a, _b;\n\n this.savePointer(event.clientX, event.clientY, this.state.cursorButton);\n\n if (gesture.pointers.has(event.pointerId)) {\n gesture.pointers.set(event.pointerId, {\n x: event.clientX,\n y: event.clientY\n });\n }\n\n const initialScale = gesture.initialScale;\n\n if (gesture.pointers.size === 2 && gesture.lastCenter && initialScale && gesture.initialDistance) {\n const center = (0,_gesture__WEBPACK_IMPORTED_MODULE_22__.getCenter)(gesture.pointers);\n const deltaX = center.x - gesture.lastCenter.x;\n const deltaY = center.y - gesture.lastCenter.y;\n gesture.lastCenter = center;\n const distance = (0,_gesture__WEBPACK_IMPORTED_MODULE_22__.getDistance)(Array.from(gesture.pointers.values()));\n const scaleFactor = !this.state.allowPinchZoom && //zsviczian\n this.state.activeTool.type === \"freedraw\" && this.state.penMode ? 1 : distance / gesture.initialDistance;\n const nextZoom = scaleFactor ? (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getNormalizedZoom)(initialScale * scaleFactor) : this.state.zoom.value;\n this.setState(state => {\n const zoomState = (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_31__.getStateForZoom)({\n viewportX: center.x,\n viewportY: center.y,\n nextZoom\n }, state);\n this.translateCanvas({\n zoom: zoomState.zoom,\n scrollX: zoomState.scrollX + deltaX / nextZoom,\n scrollY: zoomState.scrollY + deltaY / nextZoom,\n shouldCacheIgnoreZoom: true\n });\n });\n this.resetShouldCacheIgnoreZoomDebounced();\n } else {\n gesture.lastCenter = gesture.initialDistance = gesture.initialScale = null;\n }\n\n if (isHoldingSpace || isPanning || isDraggingScrollBar || (0,_appState__WEBPACK_IMPORTED_MODULE_10__.isHandToolActive)(this.state)) {\n return;\n }\n\n const isPointerOverScrollBars = (0,_scene__WEBPACK_IMPORTED_MODULE_29__.isOverScrollBars)(currentScrollBars, event.clientX - this.state.offsetLeft, event.clientY - this.state.offsetTop);\n const isOverScrollBar = isPointerOverScrollBars.isOverEither;\n\n if (!this.state.draggingElement && !this.state.multiElement) {\n if (isOverScrollBar) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n }\n }\n\n const scenePointer = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n const {\n x: scenePointerX,\n y: scenePointerY\n } = scenePointer;\n\n if (!this.state.draggingElement && (0,_snapping__WEBPACK_IMPORTED_MODULE_58__.isActiveToolNonLinearSnappable)(this.state.activeTool.type)) {\n const {\n originOffset,\n snapLines\n } = (0,_snapping__WEBPACK_IMPORTED_MODULE_58__.getSnapLinesAtPointer)(this.scene.getNonDeletedElements(), this.state, {\n x: scenePointerX,\n y: scenePointerY\n }, event);\n this.setState({\n snapLines,\n originSnapOffset: originOffset\n });\n } else if (!this.state.draggingElement) {\n this.setState({\n snapLines: []\n });\n }\n\n if (this.state.editingLinearElement && !this.state.editingLinearElement.isDragging) {\n const editingLinearElement = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.handlePointerMove(event, scenePointerX, scenePointerY, this.state);\n\n if (editingLinearElement && editingLinearElement !== this.state.editingLinearElement) {\n // Since we are reading from previous state which is not possible with\n // automatic batching in React 18 hence using flush sync to synchronously\n // update the state. Check https://github.com/excalidraw/excalidraw/pull/5508 for more details.\n (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.flushSync)(() => {\n this.setState({\n editingLinearElement\n });\n });\n }\n\n if ((editingLinearElement === null || editingLinearElement === void 0 ? void 0 : editingLinearElement.lastUncommittedPoint) != null) {\n this.maybeSuggestBindingAtCursor(scenePointer);\n } else {\n // causes stack overflow if not sync\n (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.flushSync)(() => {\n this.setState({\n suggestedBindings: []\n });\n });\n }\n }\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBindingElementType)(this.state.activeTool.type)) {\n // Hovering with a selected tool or creating new linear element via click\n // and point\n const {\n draggingElement\n } = this.state;\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBindingElement)(draggingElement, false)) {\n this.maybeSuggestBindingsForLinearElementAtCoords(draggingElement, [scenePointer], this.state.startBoundElement);\n } else {\n this.maybeSuggestBindingAtCursor(scenePointer);\n }\n }\n\n if (this.state.multiElement) {\n const {\n multiElement\n } = this.state;\n const {\n x: rx,\n y: ry\n } = multiElement;\n const {\n points,\n lastCommittedPoint\n } = multiElement;\n const lastPoint = points[points.length - 1];\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n\n if (lastPoint === lastCommittedPoint) {\n // if we haven't yet created a temp point and we're beyond commit-zone\n // threshold, add a point\n if ((0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(scenePointerX - rx, scenePointerY - ry, lastPoint[0], lastPoint[1]) >= _constants__WEBPACK_IMPORTED_MODULE_12__.LINE_CONFIRM_THRESHOLD) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(multiElement, {\n points: [...points, [scenePointerX - rx, scenePointerY - ry]]\n });\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER); // in this branch, we're inside the commit zone, and no uncommitted\n // point exists. Thus do nothing (don't add/remove points).\n }\n } else if (points.length > 2 && lastCommittedPoint && (0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(scenePointerX - rx, scenePointerY - ry, lastCommittedPoint[0], lastCommittedPoint[1]) < _constants__WEBPACK_IMPORTED_MODULE_12__.LINE_CONFIRM_THRESHOLD) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER);\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(multiElement, {\n points: points.slice(0, -1)\n });\n } else {\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(scenePointerX, scenePointerY, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize);\n const [lastCommittedX, lastCommittedY] = (_a = multiElement === null || multiElement === void 0 ? void 0 : multiElement.lastCommittedPoint) !== null && _a !== void 0 ? _a : [0, 0];\n let dxFromLastCommitted = gridX - rx - lastCommittedX;\n let dyFromLastCommitted = gridY - ry - lastCommittedY;\n\n if ((0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldRotateWithDiscreteAngle)(event)) {\n ({\n width: dxFromLastCommitted,\n height: dyFromLastCommitted\n } = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getLockedLinearCursorAlignSize)( // actual coordinate of the last committed point\n lastCommittedX + rx, lastCommittedY + ry, // cursor-grid coordinate\n gridX, gridY));\n }\n\n if ((0,_math__WEBPACK_IMPORTED_MODULE_28__.isPathALoop)(points, this.state.zoom.value)) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER);\n } // update last uncommitted point\n\n\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(multiElement, {\n points: [...points.slice(0, -1), [lastCommittedX + dxFromLastCommitted, lastCommittedY + dyFromLastCommitted]]\n });\n }\n\n return;\n }\n\n const hasDeselectedButton = Boolean(event.buttons);\n\n if (hasDeselectedButton || this.state.activeTool.type !== \"selection\" && this.state.activeTool.type !== \"text\" && this.state.activeTool.type !== \"eraser\") {\n return;\n }\n\n const elements = this.scene.getNonDeletedElements();\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (selectedElements.length === 1 && !isOverScrollBar && !this.state.editingLinearElement) {\n const elementWithTransformHandleType = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getElementWithTransformHandleType)(elements, this.state, scenePointerX, scenePointerY, this.state.zoom, event.pointerType);\n\n if (elementWithTransformHandleType && elementWithTransformHandleType.transformHandleType) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, (0,_element__WEBPACK_IMPORTED_MODULE_16__.getCursorForResizingElement)(elementWithTransformHandleType));\n return;\n }\n } else if (selectedElements.length > 1 && !isOverScrollBar) {\n const transformHandleType = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getTransformHandleTypeFromCoords)((0,_element__WEBPACK_IMPORTED_MODULE_16__.getCommonBounds)(selectedElements), scenePointerX, scenePointerY, this.state.zoom, event.pointerType);\n\n if (transformHandleType) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, (0,_element__WEBPACK_IMPORTED_MODULE_16__.getCursorForResizingElement)({\n transformHandleType\n }));\n return;\n }\n }\n\n const hitElement = this.getElementAtPosition(scenePointer.x, scenePointer.y);\n this.hitLinkElement = this.getElementLinkAtPosition(scenePointer, hitElement);\n\n if ((0,_appState__WEBPACK_IMPORTED_MODULE_10__.isEraserActive)(this.state)) {\n return;\n }\n\n if (this.hitLinkElement && !this.state.selectedElementIds[this.hitLinkElement.id]) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER);\n (0,_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.showHyperlinkTooltip)(this.hitLinkElement, this.state);\n\n if (this.props.onLinkHover) {\n this.props.onLinkHover(this.hitLinkElement, event);\n } //zsviczian\n\n } else {\n (0,_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.hideHyperlinkToolip)();\n\n if (hitElement && (hitElement.link || (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement)) && this.state.selectedElementIds[hitElement.id] && !this.state.contextMenu && !this.state.showHyperlinkPopup) {\n this.setState({\n showHyperlinkPopup: \"info\"\n });\n } else if (this.state.activeTool.type === \"text\") {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(hitElement) ? _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.TEXT : _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.CROSSHAIR);\n } else if (this.state.viewModeEnabled) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRAB);\n } else if (isOverScrollBar) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.AUTO);\n } else if (this.state.selectedLinearElement) {\n this.handleHoverSelectedLinearElement(this.state.selectedLinearElement, scenePointerX, scenePointerY);\n } else if ( // if using cmd/ctrl, we're not dragging\n !event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) {\n if ((hitElement || this.isHittingCommonBoundingBoxOfSelectedElements(scenePointer, selectedElements)) && !(hitElement === null || hitElement === void 0 ? void 0 : hitElement.locked)) {\n if (hitElement && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement) && this.isEmbeddableCenter(hitElement, event, scenePointerX, scenePointerY)) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER);\n this.setState({\n activeEmbeddable: {\n element: hitElement,\n state: \"hover\"\n }\n });\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.MOVE);\n\n if (((_b = this.state.activeEmbeddable) === null || _b === void 0 ? void 0 : _b.state) === \"hover\") {\n this.setState({\n activeEmbeddable: null\n });\n }\n }\n }\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.AUTO);\n }\n }\n };\n\n this.handleEraser = (event, pointerDownState, scenePointer) => {\n const updateElementIds = elements => {\n elements.forEach(element => {\n if (element.locked) {\n return;\n }\n\n idsToUpdate.push(element.id);\n\n if (event.altKey) {\n if (pointerDownState.elementIdsToErase[element.id] && pointerDownState.elementIdsToErase[element.id].erase) {\n pointerDownState.elementIdsToErase[element.id].erase = false;\n }\n } else if (!pointerDownState.elementIdsToErase[element.id]) {\n pointerDownState.elementIdsToErase[element.id] = {\n erase: true,\n opacity: element.opacity\n };\n }\n });\n };\n\n const idsToUpdate = [];\n const distance = (0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(pointerDownState.lastCoords.x, pointerDownState.lastCoords.y, scenePointer.x, scenePointer.y);\n const threshold = 10 / this.state.zoom.value;\n const point = Object.assign({}, pointerDownState.lastCoords);\n let samplingInterval = 0;\n\n while (samplingInterval <= distance) {\n const hitElements = this.getElementsAtPosition(point.x, point.y);\n updateElementIds(hitElements); // Exit since we reached current point\n\n if (samplingInterval === distance) {\n break;\n } // Calculate next point in the line at a distance of sampling interval\n\n\n samplingInterval = Math.min(samplingInterval + threshold, distance);\n const distanceRatio = samplingInterval / distance;\n const nextX = (1 - distanceRatio) * point.x + distanceRatio * scenePointer.x;\n const nextY = (1 - distanceRatio) * point.y + distanceRatio * scenePointer.y;\n point.x = nextX;\n point.y = nextY;\n }\n\n const elements = this.scene.getElementsIncludingDeleted().map(ele => {\n const id = (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBoundToContainer)(ele) && idsToUpdate.includes(ele.containerId) ? ele.containerId : ele.id;\n\n if (idsToUpdate.includes(id)) {\n if (event.altKey) {\n if (pointerDownState.elementIdsToErase[id] && pointerDownState.elementIdsToErase[id].erase === false) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n opacity: pointerDownState.elementIdsToErase[id].opacity\n });\n }\n } else {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n opacity: _constants__WEBPACK_IMPORTED_MODULE_12__.ELEMENT_READY_TO_ERASE_OPACITY\n });\n }\n }\n\n return ele;\n });\n this.scene.replaceAllElements(elements);\n pointerDownState.lastCoords.x = scenePointer.x;\n pointerDownState.lastCoords.y = scenePointer.y;\n }; // set touch moving for mobile context menu\n\n\n this.handleTouchMove = event => {\n invalidateContextMenu = true;\n };\n\n this.handleCanvasPointerDown = event => {\n var _a, _b;\n\n this.focusContainer(); //zsviczian\n // since contextMenu options are potentially evaluated on each render,\n // and an contextMenu action may depend on selection state, we must\n // close the contextMenu before we update the selection on pointerDown\n // (e.g. resetting selection)\n\n if (this.state.contextMenu) {\n this.setState({\n contextMenu: null\n });\n }\n\n if (this.state.snapLines) {\n this.setAppState({\n snapLines: []\n });\n }\n\n this.updateGestureOnPointerDown(event); // if dragging element is freedraw and another pointerdown event occurs\n // a second finger is on the screen\n // discard the freedraw element if it is very short because it is likely\n // just a spike, otherwise finalize the freedraw element when the second\n // finger is lifted\n\n if (event.pointerType === \"touch\" && this.state.draggingElement && this.state.draggingElement.type === \"freedraw\") {\n const element = this.state.draggingElement;\n this.updateScene(Object.assign(Object.assign({}, element.points.length < 10 ? {\n elements: this.scene.getElementsIncludingDeleted().filter(el => el.id !== element.id)\n } : {}), {\n appState: {\n draggingElement: null,\n editingElement: null,\n startBoundElement: null,\n suggestedBindings: [],\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.keys(this.state.selectedElementIds).filter(key => key !== element.id).reduce((obj, key) => {\n obj[key] = this.state.selectedElementIds[key];\n return obj;\n }, {}), this.state)\n }\n }));\n return;\n } // remove any active selection when we start to interact with canvas\n // (mainly, we care about removing selection outside the component which\n // would prevent our copy handling otherwise)\n\n\n const selection = document.getSelection();\n\n if (selection === null || selection === void 0 ? void 0 : selection.anchorNode) {\n selection.removeAllRanges();\n }\n\n this.maybeOpenContextMenuAfterPointerDownOnTouchDevices(event);\n this.maybeCleanupAfterMissingPointerUp(event); //fires only once, if pen is detected, penMode is enabled\n //the user can disable this by toggling the penMode button\n\n if (!this.state.penDetected && event.pointerType === \"pen\") {\n this.setState(prevState => {\n return {\n penMode: true,\n penDetected: true\n };\n });\n }\n\n if (!this.device.isTouchScreen && [\"pen\", \"touch\"].includes(event.pointerType)) {\n this.device = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateObject)(this.device, {\n isTouchScreen: true\n });\n }\n\n if (isPanning) {\n return;\n }\n\n this.lastPointerDown = event;\n this.setState({\n lastPointerDownWith: event.pointerType,\n cursorButton: \"down\"\n });\n this.savePointer(event.clientX, event.clientY, \"down\");\n\n if (this.handleCanvasPanUsingWheelOrSpaceDrag(event)) {\n return;\n } // only handle left mouse button or touch\n\n\n if (event.button !== _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_BUTTON.MAIN && event.button !== _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_BUTTON.TOUCH) {\n return;\n } // don't select while panning\n\n\n if (gesture.pointers.size > 1) {\n return;\n } // State for the duration of a pointer interaction, which starts with a\n // pointerDown event, ends with a pointerUp event (or another pointerDown)\n\n\n const pointerDownState = this.initialPointerDownState(event);\n this.setState({\n selectedElementsAreBeingDragged: false\n });\n\n if (this.handleDraggingScrollBar(event, pointerDownState)) {\n return;\n }\n\n this.clearSelectionIfNotUsingSelection();\n this.updateBindingEnabledOnPointerMove(event);\n\n if (this.handleSelectionOnPointerDown(event, pointerDownState)) {\n return;\n }\n\n const allowOnPointerDown = !this.state.penMode || event.pointerType !== \"touch\" || this.state.activeTool.type === \"selection\" || this.state.activeTool.type === \"text\" || this.state.activeTool.type === \"image\";\n\n if (!allowOnPointerDown) {\n return;\n }\n\n if (this.state.activeTool.type === \"text\") {\n this.handleTextOnPointerDown(event, pointerDownState);\n return;\n } else if (this.state.activeTool.type === \"arrow\" || this.state.activeTool.type === \"line\") {\n this.handleLinearElementOnPointerDown(event, this.state.activeTool.type, pointerDownState);\n } else if (this.state.activeTool.type === \"image\") {\n // reset image preview on pointerdown\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.CROSSHAIR); // retrieve the latest element as the state may be stale\n\n const pendingImageElement = this.state.pendingImageElementId && this.scene.getElement(this.state.pendingImageElementId);\n\n if (!pendingImageElement) {\n return;\n }\n\n this.setState({\n draggingElement: pendingImageElement,\n editingElement: pendingImageElement,\n pendingImageElementId: null,\n multiElement: null\n });\n const {\n x,\n y\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(pendingImageElement, {\n x,\n y\n });\n } else if (this.state.activeTool.type === \"freedraw\") {\n this.handleFreeDrawElementOnPointerDown(event, this.state.activeTool.type, pointerDownState);\n } else if (this.state.activeTool.type === \"custom\") {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.AUTO);\n } else if (this.state.activeTool.type === \"frame\") {\n this.createFrameElementOnPointerDown(pointerDownState);\n } else if (this.state.activeTool.type !== \"eraser\" && this.state.activeTool.type !== \"hand\" && this.state.activeTool.type !== \"mermaid\") {\n this.createGenericElementOnPointerDown(this.state.activeTool.type, pointerDownState);\n }\n\n (_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.onPointerDown) === null || _b === void 0 ? void 0 : _b.call(_a, this.state.activeTool, pointerDownState);\n const onPointerMove = this.onPointerMoveFromPointerDownHandler(pointerDownState);\n const onPointerUp = this.onPointerUpFromPointerDownHandler(pointerDownState);\n const onKeyDown = this.onKeyDownFromPointerDownHandler(pointerDownState);\n const onKeyUp = this.onKeyUpFromPointerDownHandler(pointerDownState);\n lastPointerUp = onPointerUp;\n\n if (!this.state.viewModeEnabled) {\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_MOVE, onPointerMove);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, onPointerUp);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYDOWN, onKeyDown);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYUP, onKeyUp);\n pointerDownState.eventListeners.onMove = onPointerMove;\n pointerDownState.eventListeners.onUp = onPointerUp;\n pointerDownState.eventListeners.onKeyUp = onKeyUp;\n pointerDownState.eventListeners.onKeyDown = onKeyDown;\n }\n };\n\n this.handleCanvasPointerUp = event => {\n var _a, _b;\n\n this.removePointer(event);\n this.lastPointerUp = event;\n const scenePointer = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: event.clientX,\n clientY: event.clientY\n }, this.state);\n const clicklength = event.timeStamp - ((_b = (_a = this.lastPointerDown) === null || _a === void 0 ? void 0 : _a.timeStamp) !== null && _b !== void 0 ? _b : 0);\n\n if (this.device.isMobile && clicklength < 300) {\n const hitElement = this.getElementAtPosition(scenePointer.x, scenePointer.y);\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement) && this.isEmbeddableCenter(hitElement, event, scenePointer.x, scenePointer.y)) {\n this.handleEmbeddableCenterClick(hitElement);\n return;\n }\n }\n\n if (this.device.isTouchScreen) {\n const hitElement = this.getElementAtPosition(scenePointer.x, scenePointer.y);\n this.hitLinkElement = this.getElementLinkAtPosition(scenePointer, hitElement);\n }\n\n if (this.hitLinkElement && !this.state.selectedElementIds[this.hitLinkElement.id]) {\n if (clicklength < 300 && this.hitLinkElement.type === \"embeddable\" && !(0,_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.isPointHittingLinkIcon)(this.hitLinkElement, this.state, [scenePointer.x, scenePointer.y])) {\n this.handleEmbeddableCenterClick(this.hitLinkElement);\n } else {\n this.redirectToLink(event, this.device.isTouchScreen);\n }\n } else if (this.state.viewModeEnabled) {\n this.setState({\n activeEmbeddable: null,\n selectedElementIds: {}\n });\n }\n };\n\n this.maybeOpenContextMenuAfterPointerDownOnTouchDevices = event => {\n // deal with opening context menu on touch devices\n if (event.pointerType === \"touch\") {\n invalidateContextMenu = false;\n\n if (touchTimeout) {\n // If there's already a touchTimeout, this means that there's another\n // touch down and we are doing another touch, so we shouldn't open the\n // context menu.\n invalidateContextMenu = true;\n } else {\n // open the context menu with the first touch's clientX and clientY\n // if the touch is not moving\n touchTimeout = window.setTimeout(() => {\n touchTimeout = 0;\n\n if (!invalidateContextMenu) {\n this.handleCanvasContextMenu(event);\n }\n }, _constants__WEBPACK_IMPORTED_MODULE_12__.TOUCH_CTX_MENU_TIMEOUT);\n }\n }\n };\n\n this.resetContextMenuTimer = () => {\n clearTimeout(touchTimeout);\n touchTimeout = 0;\n invalidateContextMenu = false;\n }; // Returns whether the event is a panning\n\n\n this.handleCanvasPanUsingWheelOrSpaceDrag = event => {\n if (!(gesture.pointers.size <= 1 && (event.button === _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_BUTTON.WHEEL || event.button === _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_BUTTON.MAIN && isHoldingSpace || (0,_appState__WEBPACK_IMPORTED_MODULE_10__.isHandToolActive)(this.state) || this.state.viewModeEnabled)) || (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(this.state.editingElement)) {\n return false;\n }\n\n isPanning = true;\n event.preventDefault();\n let nextPastePrevented = false;\n const isLinux = /Linux/.test(window.navigator.platform);\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRABBING);\n let {\n clientX: lastX,\n clientY: lastY\n } = event;\n const onPointerMove = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdatesThrottled)(event => {\n const deltaX = lastX - event.clientX;\n const deltaY = lastY - event.clientY;\n lastX = event.clientX;\n lastY = event.clientY;\n /*\r\n * Prevent paste event if we move while middle clicking on Linux.\r\n * See issue #1383.\r\n */\n\n if (isLinux && !nextPastePrevented && (Math.abs(deltaX) > 1 || Math.abs(deltaY) > 1)) {\n nextPastePrevented = true;\n /* Prevent the next paste event */\n\n const preventNextPaste = event => {\n document.body.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.PASTE, preventNextPaste);\n event.stopPropagation();\n };\n /*\r\n * Reenable next paste in case of disabled middle click paste for\r\n * any reason:\r\n * - right click paste\r\n * - empty clipboard\r\n */\n\n\n const enableNextPaste = () => {\n setTimeout(() => {\n document.body.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.PASTE, preventNextPaste);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, enableNextPaste);\n }, 100);\n };\n\n document.body.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.PASTE, preventNextPaste);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, enableNextPaste);\n }\n\n this.translateCanvas({\n scrollX: this.state.scrollX - deltaX / this.state.zoom.value,\n scrollY: this.state.scrollY - deltaY / this.state.zoom.value\n });\n });\n const teardown = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(lastPointerUp = () => {\n lastPointerUp = null;\n isPanning = false;\n\n if (!isHoldingSpace) {\n if (this.state.viewModeEnabled) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRAB);\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n }\n }\n\n this.setState({\n cursorButton: \"up\"\n });\n this.savePointer(event.clientX, event.clientY, \"up\");\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_MOVE, onPointerMove);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, teardown);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.BLUR, teardown);\n onPointerMove.flush();\n });\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.BLUR, teardown);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_MOVE, onPointerMove, {\n passive: true\n });\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, teardown);\n return true;\n };\n\n this.clearSelectionIfNotUsingSelection = () => {\n if (this.state.activeTool.type !== \"selection\") {\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n selectedGroupIds: {},\n editingGroupId: null,\n activeEmbeddable: null\n });\n }\n };\n /**\r\n * @returns whether the pointer event has been completely handled\r\n */\n\n\n this.handleSelectionOnPointerDown = (event, pointerDownState) => {\n var _a;\n\n if (this.state.activeTool.type === \"selection\") {\n const elements = this.scene.getNonDeletedElements();\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (selectedElements.length === 1 && !this.state.editingLinearElement) {\n const elementWithTransformHandleType = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getElementWithTransformHandleType)(elements, this.state, pointerDownState.origin.x, pointerDownState.origin.y, this.state.zoom, event.pointerType);\n\n if (elementWithTransformHandleType != null) {\n this.setState({\n resizingElement: elementWithTransformHandleType.element\n });\n pointerDownState.resize.handleType = elementWithTransformHandleType.transformHandleType;\n }\n } else if (selectedElements.length > 1) {\n pointerDownState.resize.handleType = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getTransformHandleTypeFromCoords)((0,_element__WEBPACK_IMPORTED_MODULE_16__.getCommonBounds)(selectedElements), pointerDownState.origin.x, pointerDownState.origin.y, this.state.zoom, event.pointerType);\n }\n\n if (pointerDownState.resize.handleType) {\n pointerDownState.resize.isResizing = true;\n pointerDownState.resize.offset = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.tupleToCoors)((0,_element__WEBPACK_IMPORTED_MODULE_16__.getResizeOffsetXY)(pointerDownState.resize.handleType, selectedElements, pointerDownState.origin.x, pointerDownState.origin.y));\n\n if (selectedElements.length === 1 && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(selectedElements[0]) && selectedElements[0].points.length === 2) {\n pointerDownState.resize.arrowDirection = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getResizeArrowDirection)(pointerDownState.resize.handleType, selectedElements[0]);\n }\n } else {\n if (this.state.selectedLinearElement) {\n const linearElementEditor = this.state.editingLinearElement || this.state.selectedLinearElement;\n const ret = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.handlePointerDown(event, this.state, this.history, pointerDownState.origin, linearElementEditor);\n\n if (ret.hitElement) {\n pointerDownState.hit.element = ret.hitElement;\n }\n\n if (ret.linearElementEditor) {\n this.setState({\n selectedLinearElement: ret.linearElementEditor\n });\n\n if (this.state.editingLinearElement) {\n this.setState({\n editingLinearElement: ret.linearElementEditor\n });\n }\n }\n\n if (ret.didAddPoint) {\n return true;\n }\n } // hitElement may already be set above, so check first\n\n\n pointerDownState.hit.element = (_a = pointerDownState.hit.element) !== null && _a !== void 0 ? _a : this.getElementAtPosition(pointerDownState.origin.x, pointerDownState.origin.y);\n\n if (pointerDownState.hit.element) {\n // Early return if pointer is hitting link icon\n const hitLinkElement = this.getElementLinkAtPosition({\n x: pointerDownState.origin.x,\n y: pointerDownState.origin.y\n }, pointerDownState.hit.element);\n\n if (hitLinkElement) {\n return false;\n }\n } // For overlapped elements one position may hit\n // multiple elements\n\n\n pointerDownState.hit.allHitElements = this.getElementsAtPosition(pointerDownState.origin.x, pointerDownState.origin.y);\n const hitElement = pointerDownState.hit.element;\n const someHitElementIsSelected = pointerDownState.hit.allHitElements.some(element => this.isASelectedElement(element));\n\n if ((hitElement === null || !someHitElementIsSelected) && !event.shiftKey && !pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements) {\n this.clearSelection(hitElement);\n }\n\n if (this.state.editingLinearElement) {\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({\n [this.state.editingLinearElement.elementId]: true\n }, this.state)\n }); // If we click on something\n } else if (hitElement != null) {\n // on CMD/CTRL, drill down to hit element regardless of groups etc.\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) {\n if (!this.state.selectedElementIds[hitElement.id]) {\n pointerDownState.hit.wasAddedToSelection = true;\n }\n\n this.setState(prevState => Object.assign(Object.assign({}, (0,_groups__WEBPACK_IMPORTED_MODULE_23__.editGroupForSelectedElement)(prevState, hitElement)), {\n previousSelectedElementIds: this.state.selectedElementIds\n })); // mark as not completely handled so as to allow dragging etc.\n\n return false;\n } // deselect if item is selected\n // if shift is not clicked, this will always return true\n // otherwise, it will trigger selection based on current\n // state of the box\n\n\n if (!this.state.selectedElementIds[hitElement.id]) {\n // if we are currently editing a group, exiting editing mode and deselect the group.\n if (this.state.editingGroupId && !(0,_groups__WEBPACK_IMPORTED_MODULE_23__.isElementInGroup)(hitElement, this.state.editingGroupId)) {\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n selectedGroupIds: {},\n editingGroupId: null,\n activeEmbeddable: null\n });\n } // Add hit element to selection. At this point if we're not holding\n // SHIFT the previously selected element(s) were deselected above\n // (make sure you use setState updater to use latest state)\n // With shift-selection, we want to make sure that frames and their containing\n // elements are not selected at the same time.\n\n\n if (!someHitElementIsSelected && !pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements) {\n this.setState(prevState => {\n const nextSelectedElementIds = Object.assign(Object.assign({}, prevState.selectedElementIds), {\n [hitElement.id]: true\n });\n const previouslySelectedElements = [];\n Object.keys(prevState.selectedElementIds).forEach(id => {\n const element = this.scene.getElement(id);\n element && previouslySelectedElements.push(element);\n }); // if hitElement is frame, deselect all of its elements if they are selected\n\n if (hitElement.type === \"frame\") {\n (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getFrameElements)(previouslySelectedElements, hitElement.id).forEach(element => {\n delete nextSelectedElementIds[element.id];\n });\n } else if (hitElement.frameId) {\n // if hitElement is in a frame and its frame has been selected\n // disable selection for the given element\n if (nextSelectedElementIds[hitElement.frameId]) {\n delete nextSelectedElementIds[hitElement.id];\n }\n } else {\n // hitElement is neither a frame nor an element in a frame\n // but since hitElement could be in a group with some frames\n // this means selecting hitElement will have the frames selected as well\n // because we want to keep the invariant:\n // - frames and their elements are not selected at the same time\n // we deselect elements in those frames that were previously selected\n const groupIds = hitElement.groupIds;\n const framesInGroups = new Set(groupIds.flatMap(gid => (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getElementsInGroup)(this.scene.getNonDeletedElements(), gid)).filter(element => element.type === \"frame\").map(frame => frame.id));\n\n if (framesInGroups.size > 0) {\n previouslySelectedElements.forEach(element => {\n if (element.frameId && framesInGroups.has(element.frameId)) {\n // deselect element and groups containing the element\n delete nextSelectedElementIds[element.id];\n element.groupIds.flatMap(gid => (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getElementsInGroup)(this.scene.getNonDeletedElements(), gid)).forEach(element => {\n delete nextSelectedElementIds[element.id];\n });\n }\n });\n }\n }\n\n return Object.assign(Object.assign({}, (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: prevState.editingGroupId,\n selectedElementIds: nextSelectedElementIds\n }, this.scene.getNonDeletedElements(), prevState, this)), {\n showHyperlinkPopup: hitElement.link || (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement) ? \"info\" : false\n });\n });\n pointerDownState.hit.wasAddedToSelection = true;\n }\n }\n }\n\n this.setState({\n previousSelectedElementIds: this.state.selectedElementIds\n });\n }\n }\n\n return false;\n };\n\n this.handleTextOnPointerDown = (event, pointerDownState) => {\n // if we're currently still editing text, clicking outside\n // should only finalize it, not create another (irrespective\n // of state.activeTool.locked)\n if ((0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(this.state.editingElement)) {\n return;\n }\n\n let sceneX = pointerDownState.origin.x;\n let sceneY = pointerDownState.origin.y;\n const element = this.getElementAtPosition(sceneX, sceneY, {\n includeBoundTextElement: true\n }); // FIXME\n\n let container = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getTextBindableContainerAtPosition)(this.scene.getNonDeletedElements(), this.state, sceneX, sceneY);\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.hasBoundTextElement)(element)) {\n container = element;\n sceneX = element.x + element.width / 2;\n sceneY = element.y + element.height / 2;\n }\n\n this.startTextEditing({\n sceneX,\n sceneY,\n insertAtParentCenter: !event.altKey,\n container\n });\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n\n if (!this.state.activeTool.locked) {\n this.setState({\n activeTool: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, {\n type: \"selection\"\n })\n });\n }\n };\n\n this.handleFreeDrawElementOnPointerDown = (event, elementType, pointerDownState) => {\n // Begin a mark capture. This does not have to update state yet.\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerDownState.origin.x, pointerDownState.origin.y, null);\n const strokeOptions = this.state.currentStrokeOptions; //zsviczian\n\n const simulatePressure = (strokeOptions === null || strokeOptions === void 0 ? void 0 : strokeOptions.constantPressure) ? false : event.pressure === 0.5;\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords({\n x: gridX,\n y: gridY\n });\n const element = (0,_element_newElement__WEBPACK_IMPORTED_MODULE_20__.newFreeDrawElement)(Object.assign(Object.assign({\n type: elementType,\n x: gridX,\n y: gridY,\n strokeColor: this.state.currentItemStrokeColor,\n backgroundColor: this.state.currentItemBackgroundColor,\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roughness: this.state.currentItemRoughness,\n opacity: this.state.currentItemOpacity,\n roundness: null,\n simulatePressure,\n locked: false\n }, strokeOptions //zsviczian\n ? {\n customData: {\n strokeOptions\n }\n } : {}), {\n frameId: topLayerFrame ? topLayerFrame.id : null\n }));\n this.setState(prevState => {\n const nextSelectedElementIds = Object.assign({}, prevState.selectedElementIds);\n delete nextSelectedElementIds[element.id];\n return {\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(nextSelectedElementIds, prevState)\n };\n });\n const pressures = element.simulatePressure ? element.pressures : [//zsviczian\n ...element.pressures, (strokeOptions === null || strokeOptions === void 0 ? void 0 : strokeOptions.constantPressure) ? 1 : event.pressure];\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n points: [[0, 0]],\n pressures\n });\n const boundElement = (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.getHoveredElementForBinding)(pointerDownState.origin, this.scene);\n\n if (strokeOptions === null || strokeOptions === void 0 ? void 0 : strokeOptions.highlighter) {\n //zsviczian\n this.scene.replaceAllElements([element, ...this.scene.getElementsIncludingDeleted()]);\n } else {\n this.scene.addNewElement(element);\n }\n\n this.setState({\n draggingElement: element,\n editingElement: element,\n startBoundElement: boundElement,\n suggestedBindings: []\n });\n }; //create rectangle element with youtube top left on nearest grid point width / hight 640/360\n\n\n this.insertEmbeddableElement = ({\n sceneX,\n sceneY,\n link\n }) => {\n var _a;\n\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(sceneX, sceneY, ((_a = this.lastPointerDown) === null || _a === void 0 ? void 0 : _a[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) ? null : this.state.gridSize);\n const embedLink = (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.getEmbedLink)(link);\n\n if (!embedLink) {\n return;\n }\n\n if (embedLink.warning) {\n this.setToast({\n message: embedLink.warning,\n closable: true\n });\n }\n\n const element = (0,_element_newElement__WEBPACK_IMPORTED_MODULE_20__.newEmbeddableElement)({\n type: \"embeddable\",\n x: gridX,\n y: gridY,\n strokeColor: \"transparent\",\n backgroundColor: \"transparent\",\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roughness: this.state.currentItemRoughness,\n roundness: this.getCurrentItemRoundness(\"embeddable\"),\n opacity: this.state.currentItemOpacity,\n locked: false,\n width: embedLink.aspectRatio.w,\n height: embedLink.aspectRatio.h,\n link,\n validated: null\n });\n this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted(), element]);\n return element;\n };\n\n this.createImageElement = ({\n sceneX,\n sceneY\n }) => {\n var _a;\n\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(sceneX, sceneY, ((_a = this.lastPointerDown) === null || _a === void 0 ? void 0 : _a[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) ? null : this.state.gridSize);\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords({\n x: gridX,\n y: gridY\n });\n const element = (0,_element__WEBPACK_IMPORTED_MODULE_16__.newImageElement)({\n type: \"image\",\n x: gridX,\n y: gridY,\n strokeColor: this.state.currentItemStrokeColor,\n backgroundColor: this.state.currentItemBackgroundColor,\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roughness: this.state.currentItemRoughness,\n roundness: null,\n opacity: this.state.currentItemOpacity,\n locked: false,\n frameId: topLayerFrame ? topLayerFrame.id : null\n });\n return element;\n };\n\n this.handleLinearElementOnPointerDown = (event, elementType, pointerDownState) => {\n if (this.state.multiElement) {\n const {\n multiElement\n } = this.state; // finalize if completing a loop\n\n if (multiElement.type === \"line\" && (0,_math__WEBPACK_IMPORTED_MODULE_28__.isPathALoop)(multiElement.points, this.state.zoom.value)) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(multiElement, {\n lastCommittedPoint: multiElement.points[multiElement.points.length - 1]\n });\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n return;\n }\n\n const {\n x: rx,\n y: ry,\n lastCommittedPoint\n } = multiElement; // clicking inside commit zone → finalize arrow\n\n if (multiElement.points.length > 1 && lastCommittedPoint && (0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(pointerDownState.origin.x - rx, pointerDownState.origin.y - ry, lastCommittedPoint[0], lastCommittedPoint[1]) < _constants__WEBPACK_IMPORTED_MODULE_12__.LINE_CONFIRM_THRESHOLD) {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n return;\n }\n\n this.setState(prevState => ({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.assign(Object.assign({}, prevState.selectedElementIds), {\n [multiElement.id]: true\n }), prevState)\n })); // clicking outside commit zone → update reference for last committed\n // point\n\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(multiElement, {\n lastCommittedPoint: multiElement.points[multiElement.points.length - 1]\n });\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER);\n } else {\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerDownState.origin.x, pointerDownState.origin.y, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize);\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords({\n x: gridX,\n y: gridY\n });\n /* If arrow is pre-arrowheads, it will have undefined for both start and end arrowheads.\r\n If so, we want it to be null for start and \"arrow\" for end. If the linear item is not\r\n an arrow, we want it to be null for both. Otherwise, we want it to use the\r\n values from appState. */\n\n const {\n currentItemStartArrowhead,\n currentItemEndArrowhead\n } = this.state;\n const [startArrowhead, endArrowhead] = elementType === \"arrow\" ? [currentItemStartArrowhead, currentItemEndArrowhead] : [null, null];\n const element = (0,_element__WEBPACK_IMPORTED_MODULE_16__.newLinearElement)({\n type: elementType,\n x: gridX,\n y: gridY,\n strokeColor: this.state.currentItemStrokeColor,\n backgroundColor: this.state.currentItemBackgroundColor,\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roughness: this.state.currentItemRoughness,\n opacity: this.state.currentItemOpacity,\n roundness: this.state.currentItemRoundness === \"round\" ? {\n type: _constants__WEBPACK_IMPORTED_MODULE_12__.ROUNDNESS.PROPORTIONAL_RADIUS\n } : null,\n startArrowhead,\n endArrowhead,\n locked: false,\n frameId: topLayerFrame ? topLayerFrame.id : null\n });\n this.setState(prevState => {\n const nextSelectedElementIds = Object.assign({}, prevState.selectedElementIds);\n delete nextSelectedElementIds[element.id];\n return {\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(nextSelectedElementIds, prevState)\n };\n });\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n points: [...element.points, [0, 0]]\n });\n const boundElement = (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.getHoveredElementForBinding)(pointerDownState.origin, this.scene);\n this.scene.addNewElement(element);\n this.setState({\n draggingElement: element,\n editingElement: element,\n startBoundElement: boundElement,\n suggestedBindings: []\n });\n }\n };\n\n this.createGenericElementOnPointerDown = (elementType, pointerDownState) => {\n var _a;\n\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerDownState.origin.x, pointerDownState.origin.y, ((_a = this.lastPointerDown) === null || _a === void 0 ? void 0 : _a[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) ? null : this.state.gridSize);\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords({\n x: gridX,\n y: gridY\n });\n const baseElementAttributes = {\n x: gridX,\n y: gridY,\n strokeColor: this.state.currentItemStrokeColor,\n backgroundColor: this.state.currentItemBackgroundColor,\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roughness: this.state.currentItemRoughness,\n opacity: this.state.currentItemOpacity,\n roundness: this.getCurrentItemRoundness(elementType),\n locked: false,\n frameId: topLayerFrame ? topLayerFrame.id : null\n };\n let element;\n\n if (elementType === \"embeddable\") {\n element = (0,_element_newElement__WEBPACK_IMPORTED_MODULE_20__.newEmbeddableElement)(Object.assign({\n type: \"embeddable\",\n validated: null\n }, baseElementAttributes));\n } else {\n element = (0,_element__WEBPACK_IMPORTED_MODULE_16__.newElement)(Object.assign({\n type: elementType\n }, baseElementAttributes));\n }\n\n if (element.type === \"selection\") {\n this.setState({\n selectionElement: element,\n draggingElement: element\n });\n } else {\n this.scene.addNewElement(element);\n this.setState({\n multiElement: null,\n draggingElement: element,\n editingElement: element\n });\n }\n };\n\n this.createFrameElementOnPointerDown = pointerDownState => {\n var _a;\n\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerDownState.origin.x, pointerDownState.origin.y, ((_a = this.lastPointerDown) === null || _a === void 0 ? void 0 : _a[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) ? null : this.state.gridSize);\n const frame = (0,_element_newElement__WEBPACK_IMPORTED_MODULE_20__.newFrameElement)(Object.assign({\n x: gridX,\n y: gridY,\n opacity: this.state.currentItemOpacity,\n locked: false\n }, _constants__WEBPACK_IMPORTED_MODULE_12__.FRAME_STYLE));\n this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted(), frame]);\n this.setState({\n multiElement: null,\n draggingElement: frame,\n editingElement: frame\n });\n };\n\n this.restoreReadyToEraseElements = pointerDownState => {\n const elements = this.scene.getElementsIncludingDeleted().map(ele => {\n if (pointerDownState.elementIdsToErase[ele.id] && pointerDownState.elementIdsToErase[ele.id].erase) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n opacity: pointerDownState.elementIdsToErase[ele.id].opacity\n });\n } else if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBoundToContainer)(ele) && pointerDownState.elementIdsToErase[ele.containerId] && pointerDownState.elementIdsToErase[ele.containerId].erase) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n opacity: pointerDownState.elementIdsToErase[ele.containerId].opacity\n });\n } else if (ele.frameId && pointerDownState.elementIdsToErase[ele.frameId] && pointerDownState.elementIdsToErase[ele.frameId].erase) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n opacity: pointerDownState.elementIdsToErase[ele.frameId].opacity\n });\n }\n\n return ele;\n });\n this.scene.replaceAllElements(elements);\n };\n\n this.eraseElements = pointerDownState => {\n const elements = this.scene.getElementsIncludingDeleted().map(ele => {\n if (pointerDownState.elementIdsToErase[ele.id] && pointerDownState.elementIdsToErase[ele.id].erase) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n isDeleted: true\n });\n } else if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBoundToContainer)(ele) && pointerDownState.elementIdsToErase[ele.containerId] && pointerDownState.elementIdsToErase[ele.containerId].erase) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n isDeleted: true\n });\n } else if (ele.frameId && pointerDownState.elementIdsToErase[ele.frameId] && pointerDownState.elementIdsToErase[ele.frameId].erase) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n isDeleted: true\n });\n }\n\n return ele;\n });\n this.history.resumeRecording();\n this.scene.replaceAllElements(elements);\n };\n\n this.initializeImage = async ({\n imageFile,\n imageElement: _imageElement,\n showCursorImagePreview = false\n }) => {\n var _a, _b, _c, _d; // at this point this should be guaranteed image file, but we do this check\n // to satisfy TS down the line\n\n\n if (!(0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.isSupportedImageFile)(imageFile)) {\n throw new Error((0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.unsupportedFileType\"));\n }\n\n const mimeType = imageFile.type;\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, \"wait\");\n\n if (mimeType === _constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.svg) {\n try {\n imageFile = (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.SVGStringToFile)(await (0,_element_image__WEBPACK_IMPORTED_MODULE_40__.normalizeSVG)(await imageFile.text()), imageFile.name);\n } catch (error) {\n console.warn(error);\n throw new Error((0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.svgImageInsertError\"));\n }\n } // generate image id (by default the file digest) before any\n // resizing/compression takes place to keep it more portable\n\n\n const fileId = await (((_b = (_a = this.props).generateIdForFile) === null || _b === void 0 ? void 0 : _b.call(_a, imageFile)) || (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.generateIdFromFile)(imageFile));\n\n if (!fileId) {\n console.warn(\"Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one.\");\n throw new Error((0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.imageInsertError\"));\n }\n\n const existingFileData = this.files[fileId];\n\n if (!(existingFileData === null || existingFileData === void 0 ? void 0 : existingFileData.dataURL)) {\n try {\n imageFile = await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.resizeImageFile)(imageFile, {\n maxWidthOrHeight: _constants__WEBPACK_IMPORTED_MODULE_12__.DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT\n });\n } catch (error) {\n console.error(\"error trying to resing image file on insertion\", error);\n }\n\n if (imageFile.size > _constants__WEBPACK_IMPORTED_MODULE_12__.MAX_ALLOWED_FILE_BYTES) {\n throw new Error((0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.fileTooBig\", {\n maxSize: `${Math.trunc(_constants__WEBPACK_IMPORTED_MODULE_12__.MAX_ALLOWED_FILE_BYTES / 1024 / 1024)}MB`\n }));\n }\n }\n\n if (showCursorImagePreview) {\n const dataURL = (_c = this.files[fileId]) === null || _c === void 0 ? void 0 : _c.dataURL; // optimization so that we don't unnecessarily resize the original\n // full-size file for cursor preview\n // (it's much faster to convert the resized dataURL to File)\n\n const resizedFile = dataURL && (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.dataURLToFile)(dataURL);\n this.setImagePreviewCursor(resizedFile || imageFile);\n }\n\n const dataURL = ((_d = this.files[fileId]) === null || _d === void 0 ? void 0 : _d.dataURL) || (await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.getDataURL)(imageFile));\n const imageElement = (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(_imageElement, {\n fileId\n }, false);\n return new Promise(async (resolve, reject) => {\n var _a;\n\n try {\n this.files = Object.assign(Object.assign({}, this.files), {\n [fileId]: {\n mimeType,\n id: fileId,\n dataURL,\n created: Date.now(),\n lastRetrieved: Date.now()\n }\n });\n const cachedImageData = this.imageCache.get(fileId);\n\n if (!cachedImageData) {\n this.addNewImagesToImageCache();\n await this.updateImageCache([imageElement]);\n }\n\n if ((cachedImageData === null || cachedImageData === void 0 ? void 0 : cachedImageData.image) instanceof Promise) {\n await cachedImageData.image;\n }\n\n if (this.state.pendingImageElementId !== imageElement.id && ((_a = this.state.draggingElement) === null || _a === void 0 ? void 0 : _a.id) !== imageElement.id) {\n this.initializeImageDimensions(imageElement, true);\n }\n\n resolve(imageElement);\n } catch (error) {\n console.error(error);\n reject(new Error((0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.imageInsertError\")));\n } finally {\n if (!showCursorImagePreview) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n }\n }\n });\n };\n /**\r\n * inserts image into elements array and rerenders\r\n */\n\n\n this.insertImageElement = async (imageElement, imageFile, showCursorImagePreview) => {\n this.scene.addNewElement(imageElement);\n\n try {\n await this.initializeImage({\n imageFile,\n imageElement,\n showCursorImagePreview\n });\n } catch (error) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(imageElement, {\n isDeleted: true\n });\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n this.setState({\n errorMessage: error.message || (0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.imageInsertError\")\n });\n }\n };\n\n this.setImagePreviewCursor = async imageFile => {\n // mustn't be larger than 128 px\n // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Basic_User_Interface/Using_URL_values_for_the_cursor_property\n const cursorImageSizePx = 96;\n const imagePreview = await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.resizeImageFile)(imageFile, {\n maxWidthOrHeight: cursorImageSizePx\n });\n let previewDataURL = await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.getDataURL)(imagePreview); // SVG cannot be resized via `resizeImageFile` so we resize by rendering to\n // a small canvas\n\n if (imageFile.type === _constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.svg) {\n const img = await (0,_element_image__WEBPACK_IMPORTED_MODULE_40__.loadHTMLImageElement)(previewDataURL);\n let height = Math.min(img.height, cursorImageSizePx);\n let width = height * (img.width / img.height);\n\n if (width > cursorImageSizePx) {\n width = cursorImageSizePx;\n height = width * (img.height / img.width);\n }\n\n const canvas = document.createElement(\"canvas\");\n canvas.height = height;\n canvas.width = width;\n const context = canvas.getContext(\"2d\");\n context.drawImage(img, 0, 0, width, height);\n previewDataURL = canvas.toDataURL(_constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.svg);\n }\n\n if (this.state.pendingImageElementId) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, `url(${previewDataURL}) 4 4, auto`);\n }\n };\n\n this.onImageAction = async ({\n insertOnCanvasDirectly\n } = {\n insertOnCanvasDirectly: false\n }) => {\n try {\n const clientX = this.state.width / 2 + this.state.offsetLeft;\n const clientY = this.state.height / 2 + this.state.offsetTop;\n const {\n x,\n y\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX,\n clientY\n }, this.state);\n const imageFile = await (0,_data_filesystem__WEBPACK_IMPORTED_MODULE_42__.fileOpen)({\n description: \"Image\",\n extensions: Object.keys(_constants__WEBPACK_IMPORTED_MODULE_12__.IMAGE_MIME_TYPES)\n });\n const imageElement = this.createImageElement({\n sceneX: x,\n sceneY: y\n });\n\n if (insertOnCanvasDirectly) {\n this.insertImageElement(imageElement, imageFile);\n this.initializeImageDimensions(imageElement);\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({\n [imageElement.id]: true\n }, this.state)\n }, () => {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n });\n } else {\n this.setState({\n pendingImageElementId: imageElement.id\n }, () => {\n this.insertImageElement(imageElement, imageFile,\n /* showCursorImagePreview */\n true);\n });\n }\n } catch (error) {\n if (error.name !== \"AbortError\") {\n console.error(error);\n } else {\n console.warn(error);\n }\n\n this.setState({\n pendingImageElementId: null,\n editingElement: null,\n activeTool: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, {\n type: \"selection\"\n })\n }, () => {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n });\n }\n };\n\n this.initializeImageDimensions = (imageElement, forceNaturalSize = false) => {\n var _a;\n\n const image = (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isInitializedImageElement)(imageElement) && ((_a = this.imageCache.get(imageElement.fileId)) === null || _a === void 0 ? void 0 : _a.image);\n\n if (!image || image instanceof Promise) {\n if (imageElement.width < _constants__WEBPACK_IMPORTED_MODULE_12__.DRAGGING_THRESHOLD / this.state.zoom.value && imageElement.height < _constants__WEBPACK_IMPORTED_MODULE_12__.DRAGGING_THRESHOLD / this.state.zoom.value) {\n const placeholderSize = 100 / this.state.zoom.value;\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(imageElement, {\n x: imageElement.x - placeholderSize / 2,\n y: imageElement.y - placeholderSize / 2,\n width: placeholderSize,\n height: placeholderSize\n });\n }\n\n return;\n }\n\n if (forceNaturalSize || // if user-created bounding box is below threshold, assume the\n // intention was to click instead of drag, and use the image's\n // intrinsic size\n imageElement.width < _constants__WEBPACK_IMPORTED_MODULE_12__.DRAGGING_THRESHOLD / this.state.zoom.value && imageElement.height < _constants__WEBPACK_IMPORTED_MODULE_12__.DRAGGING_THRESHOLD / this.state.zoom.value) {\n const minHeight = Math.max(this.state.height - 120, 160); // max 65% of canvas height, clamped to <300px, vh - 120px>\n\n const maxHeight = Math.min(minHeight, Math.floor(this.state.height * 0.5) / this.state.zoom.value);\n const height = Math.min(image.naturalHeight, maxHeight);\n const width = height * (image.naturalWidth / image.naturalHeight); // add current imageElement width/height to account for previous centering\n // of the placeholder image\n\n const x = imageElement.x + imageElement.width / 2 - width / 2;\n const y = imageElement.y + imageElement.height / 2 - height / 2;\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(imageElement, {\n x,\n y,\n width,\n height\n });\n }\n };\n /** updates image cache, refreshing updated elements and/or setting status\r\n to error for images that fail during <img> element creation */\n\n\n this.updateImageCache = async (elements, files = this.files) => {\n const {\n updatedFiles,\n erroredFiles\n } = await (0,_element_image__WEBPACK_IMPORTED_MODULE_40__.updateImageCache)({\n imageCache: this.imageCache,\n fileIds: elements.map(element => element.fileId),\n files\n });\n\n if (updatedFiles.size || erroredFiles.size) {\n for (const element of elements) {\n if (updatedFiles.has(element.fileId)) {\n _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_66__.ShapeCache[\"delete\"](element);\n }\n }\n }\n\n if (erroredFiles.size) {\n this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().map(element => {\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isInitializedImageElement)(element) && erroredFiles.has(element.fileId)) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(element, {\n status: \"error\"\n });\n }\n\n return element;\n }));\n }\n\n return {\n updatedFiles,\n erroredFiles\n };\n };\n /** adds new images to imageCache and re-renders if needed */\n\n\n this.addNewImagesToImageCache = async (imageElements = (0,_element_image__WEBPACK_IMPORTED_MODULE_40__.getInitializedImageElements)(this.scene.getNonDeletedElements()), files = this.files) => {\n const uncachedImageElements = imageElements.filter(element => !element.isDeleted && !this.imageCache.has(element.fileId));\n\n if (uncachedImageElements.length) {\n const {\n updatedFiles\n } = await this.updateImageCache(uncachedImageElements, files);\n\n if (updatedFiles.size) {\n this.scene.informMutation();\n }\n }\n };\n /** generally you should use `addNewImagesToImageCache()` directly if you need\r\n * to render new images. This is just a failsafe */\n\n\n this.scheduleImageRefresh = lodash_throttle__WEBPACK_IMPORTED_MODULE_41___default()(() => {\n this.addNewImagesToImageCache();\n }, _constants__WEBPACK_IMPORTED_MODULE_12__.IMAGE_RENDER_TIMEOUT);\n\n this.updateBindingEnabledOnPointerMove = event => {\n const shouldEnableBinding = (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.shouldEnableBindingForPointerEvent)(event);\n\n if (this.state.isBindingEnabled !== shouldEnableBinding) {\n this.setState({\n isBindingEnabled: shouldEnableBinding\n });\n }\n };\n\n this.maybeSuggestBindingAtCursor = pointerCoords => {\n const hoveredBindableElement = (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.getHoveredElementForBinding)(pointerCoords, this.scene);\n this.setState({\n suggestedBindings: hoveredBindableElement != null ? [hoveredBindableElement] : []\n });\n };\n\n this.maybeSuggestBindingsForLinearElementAtCoords = (linearElement,\n /** scene coords */\n pointerCoords, // During line creation the start binding hasn't been written yet\n // into `linearElement`\n oppositeBindingBoundElement) => {\n if (!pointerCoords.length) {\n return;\n }\n\n const suggestedBindings = pointerCoords.reduce((acc, coords) => {\n const hoveredBindableElement = (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.getHoveredElementForBinding)(coords, this.scene);\n\n if (hoveredBindableElement != null && !(0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.isLinearElementSimpleAndAlreadyBound)(linearElement, oppositeBindingBoundElement === null || oppositeBindingBoundElement === void 0 ? void 0 : oppositeBindingBoundElement.id, hoveredBindableElement)) {\n acc.push(hoveredBindableElement);\n }\n\n return acc;\n }, []);\n this.setState({\n suggestedBindings\n });\n };\n\n this.handleInteractiveCanvasRef = canvas => {\n var _a, _b, _c; // canvas is null when unmounting\n\n\n if (canvas !== null) {\n this.interactiveCanvas = canvas; // -----------------------------------------------------------------------\n // NOTE wheel, touchstart, touchend events must be registered outside\n // of react because react binds them them passively (so we can't prevent\n // default on them)\n\n this.interactiveCanvas.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.WHEEL, this.handleWheel);\n this.interactiveCanvas.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.TOUCH_START, this.onTouchStart);\n this.interactiveCanvas.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.TOUCH_END, this.onTouchEnd); // -----------------------------------------------------------------------\n } else {\n (_a = this.interactiveCanvas) === null || _a === void 0 ? void 0 : _a.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.WHEEL, this.handleWheel);\n (_b = this.interactiveCanvas) === null || _b === void 0 ? void 0 : _b.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.TOUCH_START, this.onTouchStart);\n (_c = this.interactiveCanvas) === null || _c === void 0 ? void 0 : _c.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.TOUCH_END, this.onTouchEnd);\n }\n };\n\n this.handleAppOnDrop = async event => {\n var _a, _b, _c, _d;\n\n if (this.props.onDrop) {\n try {\n if ((await this.props.onDrop(event)) === false) {\n return;\n }\n } catch (e) {\n console.error(e);\n }\n } // must be retrieved first, in the same frame\n\n\n const {\n file,\n fileHandle\n } = await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.getFileFromEvent)(event);\n const {\n x: sceneX,\n y: sceneY\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n\n try {\n if ((0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.isSupportedImageFile)(file)) {\n // first attempt to decode scene from the image if it's embedded\n // ---------------------------------------------------------------------\n if ((file === null || file === void 0 ? void 0 : file.type) === _constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.png || (file === null || file === void 0 ? void 0 : file.type) === _constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.svg) {\n try {\n const scene = await (0,_data__WEBPACK_IMPORTED_MODULE_13__.loadFromBlob)(file, this.state, this.scene.getElementsIncludingDeleted(), fileHandle);\n this.syncActionResult(Object.assign(Object.assign({}, scene), {\n appState: Object.assign(Object.assign({}, scene.appState || this.state), {\n isLoading: false\n }),\n replaceFiles: true,\n commitToHistory: true\n }));\n return;\n } catch (error) {\n if (error.name !== \"EncodingError\") {\n throw error;\n }\n }\n } // if no scene is embedded or we fail for whatever reason, fall back\n // to importing as regular image\n // ---------------------------------------------------------------------\n\n\n const imageElement = this.createImageElement({\n sceneX,\n sceneY\n });\n this.insertImageElement(imageElement, file);\n this.initializeImageDimensions(imageElement);\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({\n [imageElement.id]: true\n }, this.state)\n });\n return;\n }\n } catch (error) {\n return this.setState({\n isLoading: false,\n errorMessage: error.message\n });\n }\n\n const libraryJSON = event.dataTransfer.getData(_constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.excalidrawlib);\n\n if (libraryJSON && typeof libraryJSON === \"string\") {\n try {\n const libraryItems = (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.parseLibraryJSON)(libraryJSON);\n this.addElementsFromPasteOrLibrary({\n elements: (0,_data_library__WEBPACK_IMPORTED_MODULE_14__.distributeLibraryItemsOnSquareGrid)(libraryItems),\n position: event,\n files: null\n });\n } catch (error) {\n this.setState({\n errorMessage: error.message\n });\n }\n\n return;\n }\n\n if (file) {\n // atetmpt to parse an excalidraw/excalidrawlib file\n await this.loadFileToCanvas(file, fileHandle);\n }\n\n if ((_b = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.types) === null || _b === void 0 ? void 0 : _b.includes(\"text/plain\")) {\n const text = (_c = event.dataTransfer) === null || _c === void 0 ? void 0 : _c.getData(\"text\");\n\n if (text && (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.embeddableURLValidator)(text, this.props.validateEmbeddable) && (/^(http|https):\\/\\/[^\\s/$.?#].[^\\s]*$/.test(text) || ((_d = (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.getEmbedLink)(text)) === null || _d === void 0 ? void 0 : _d.type) === \"video\")) {\n const embeddable = this.insertEmbeddableElement({\n sceneX,\n sceneY,\n link: (0,_data_url__WEBPACK_IMPORTED_MODULE_47__.normalizeLink)(text)\n });\n\n if (embeddable) {\n this.setState({\n selectedElementIds: {\n [embeddable.id]: true\n }\n });\n }\n }\n }\n };\n\n this.loadFileToCanvas = async (file, fileHandle) => {\n file = await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.normalizeFile)(file);\n\n try {\n const ret = await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.loadSceneOrLibraryFromBlob)(file, this.state, this.scene.getElementsIncludingDeleted(), fileHandle);\n\n if (ret.type === _constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.excalidraw) {\n this.setState({\n isLoading: true\n });\n this.syncActionResult(Object.assign(Object.assign({}, ret.data), {\n appState: Object.assign(Object.assign({}, ret.data.appState || this.state), {\n isLoading: false\n }),\n replaceFiles: true,\n commitToHistory: true\n }));\n } else if (ret.type === _constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.excalidrawlib) {\n await this.library.updateLibrary({\n libraryItems: file,\n merge: true,\n openLibraryMenu: true\n }).catch(error => {\n console.error(error);\n this.setState({\n errorMessage: (0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.importLibraryError\")\n });\n });\n }\n } catch (error) {\n this.setState({\n isLoading: false,\n errorMessage: error.message\n });\n }\n };\n\n this.handleCanvasContextMenu = event => {\n event.preventDefault();\n\n if ((\"pointerType\" in event.nativeEvent && event.nativeEvent.pointerType === \"touch\" || \"pointerType\" in event.nativeEvent && event.nativeEvent.pointerType === \"pen\" && // always allow if user uses a pen secondary button\n event.button !== _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_BUTTON.SECONDARY) && this.state.activeTool.type !== \"selection\") {\n return;\n }\n\n const {\n x,\n y\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n const element = this.getElementAtPosition(x, y, {\n preferSelected: true,\n includeLockedElements: true\n });\n const selectedElements = this.scene.getSelectedElements(this.state);\n const isHittignCommonBoundBox = this.isHittingCommonBoundingBoxOfSelectedElements({\n x,\n y\n }, selectedElements);\n const type = element || isHittignCommonBoundBox ? \"element\" : \"canvas\";\n const container = this.excalidrawContainerRef.current;\n const {\n top: offsetTop,\n left: offsetLeft\n } = container.getBoundingClientRect();\n const left = event.clientX - offsetLeft;\n const top = event.clientY - offsetTop;\n (0,_analytics__WEBPACK_IMPORTED_MODULE_9__.trackEvent)(\"contextMenu\", \"openContextMenu\", type);\n this.setState(Object.assign(Object.assign({}, element && !this.state.selectedElementIds[element.id] ? Object.assign(Object.assign(Object.assign({}, this.state), (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: this.state.editingGroupId,\n selectedElementIds: {\n [element.id]: true\n }\n }, this.scene.getNonDeletedElements(), this.state, this)), {\n selectedLinearElement: (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(element) ? new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(element, this.scene) : null\n }) : this.state), {\n showHyperlinkPopup: false\n }), () => {\n this.setState({\n contextMenu: {\n top,\n left,\n items: this.getContextMenuItems(type)\n }\n });\n });\n };\n\n this.maybeDragNewGenericElement = (pointerDownState, event) => {\n var _a, _b, _c, _d, _e;\n\n const draggingElement = this.state.draggingElement;\n const pointerCoords = pointerDownState.lastCoords;\n\n if (!draggingElement) {\n return;\n }\n\n if (draggingElement.type === \"selection\" && this.state.activeTool.type !== \"eraser\") {\n (0,_element__WEBPACK_IMPORTED_MODULE_16__.dragNewElement)(draggingElement, this.state.activeTool.type, pointerDownState.origin.x, pointerDownState.origin.y, pointerCoords.x, pointerCoords.y, (0,_utils__WEBPACK_IMPORTED_MODULE_33__.distance)(pointerDownState.origin.x, pointerCoords.x), (0,_utils__WEBPACK_IMPORTED_MODULE_33__.distance)(pointerDownState.origin.y, pointerCoords.y), (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldMaintainAspectRatio)(event), (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldResizeFromCenter)(event));\n } else {\n let [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerCoords.x, pointerCoords.y, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize);\n const image = (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isInitializedImageElement)(draggingElement) && ((_a = this.imageCache.get(draggingElement.fileId)) === null || _a === void 0 ? void 0 : _a.image);\n const aspectRatio = image && !(image instanceof Promise) ? image.width / image.height : null;\n this.maybeCacheReferenceSnapPoints(event, [draggingElement]);\n const {\n snapOffset,\n snapLines\n } = (0,_snapping__WEBPACK_IMPORTED_MODULE_58__.snapNewElement)(draggingElement, this.state, event, {\n x: pointerDownState.originInGrid.x + ((_c = (_b = this.state.originSnapOffset) === null || _b === void 0 ? void 0 : _b.x) !== null && _c !== void 0 ? _c : 0),\n y: pointerDownState.originInGrid.y + ((_e = (_d = this.state.originSnapOffset) === null || _d === void 0 ? void 0 : _d.y) !== null && _e !== void 0 ? _e : 0)\n }, {\n x: gridX - pointerDownState.originInGrid.x,\n y: gridY - pointerDownState.originInGrid.y\n });\n gridX += snapOffset.x;\n gridY += snapOffset.y;\n this.setState({\n snapLines\n });\n (0,_element__WEBPACK_IMPORTED_MODULE_16__.dragNewElement)(draggingElement, this.state.activeTool.type, pointerDownState.originInGrid.x, pointerDownState.originInGrid.y, gridX, gridY, (0,_utils__WEBPACK_IMPORTED_MODULE_33__.distance)(pointerDownState.originInGrid.x, gridX), (0,_utils__WEBPACK_IMPORTED_MODULE_33__.distance)(pointerDownState.originInGrid.y, gridY), (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isImageElement)(draggingElement) ? !(0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldMaintainAspectRatio)(event) : (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldMaintainAspectRatio)(event), (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldResizeFromCenter)(event), aspectRatio, this.state.originSnapOffset);\n this.maybeSuggestBindingForAll([draggingElement]); // highlight elements that are to be added to frames on frames creation\n\n if (this.state.activeTool.type === \"frame\") {\n this.setState({\n elementsToHighlight: (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getElementsInResizingFrame)(this.scene.getNonDeletedElements(), draggingElement, this.state)\n });\n }\n }\n };\n\n this.maybeHandleResize = (pointerDownState, event) => {\n const selectedElements = this.scene.getSelectedElements(this.state);\n const selectedFrames = selectedElements.filter(element => element.type === \"frame\");\n const transformHandleType = pointerDownState.resize.handleType;\n\n if (selectedFrames.length > 0 && transformHandleType === \"rotation\") {\n return false;\n }\n\n this.setState({\n // TODO: rename this state field to \"isScaling\" to distinguish\n // it from the generic \"isResizing\" which includes scaling and\n // rotating\n isResizing: transformHandleType && transformHandleType !== \"rotation\",\n isRotating: transformHandleType === \"rotation\",\n activeEmbeddable: null\n });\n const pointerCoords = pointerDownState.lastCoords;\n let [resizeX, resizeY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerCoords.x - pointerDownState.resize.offset.x, pointerCoords.y - pointerDownState.resize.offset.y, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize);\n const frameElementsOffsetsMap = new Map();\n selectedFrames.forEach(frame => {\n const elementsInFrame = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getFrameElements)(this.scene.getNonDeletedElements(), frame.id);\n elementsInFrame.forEach(element => {\n frameElementsOffsetsMap.set(frame.id + element.id, {\n x: element.x - frame.x,\n y: element.y - frame.y\n });\n });\n }); // check needed for avoiding flickering when a key gets pressed\n // during dragging\n\n if (!this.state.selectedElementsAreBeingDragged) {\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerCoords.x, pointerCoords.y, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize);\n const dragOffset = {\n x: gridX - pointerDownState.originInGrid.x,\n y: gridY - pointerDownState.originInGrid.y\n };\n const originalElements = [...pointerDownState.originalElements.values()];\n this.maybeCacheReferenceSnapPoints(event, selectedElements);\n const {\n snapOffset,\n snapLines\n } = (0,_snapping__WEBPACK_IMPORTED_MODULE_58__.snapResizingElements)(selectedElements, (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getSelectedElements)(originalElements, this.state), this.state, event, dragOffset, transformHandleType);\n resizeX += snapOffset.x;\n resizeY += snapOffset.y;\n this.setState({\n snapLines\n });\n }\n\n if ((0,_element__WEBPACK_IMPORTED_MODULE_16__.transformElements)(pointerDownState, transformHandleType, selectedElements, pointerDownState.resize.arrowDirection, (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldRotateWithDiscreteAngle)(event), (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldResizeFromCenter)(event), selectedElements.length === 1 && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isImageElement)(selectedElements[0]) ? !(0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldMaintainAspectRatio)(event) : (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldMaintainAspectRatio)(event), resizeX, resizeY, pointerDownState.resize.center.x, pointerDownState.resize.center.y, this.state)) {\n this.maybeSuggestBindingForAll(selectedElements);\n const elementsToHighlight = new Set();\n selectedFrames.forEach(frame => {\n const elementsInFrame = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getFrameElements)(this.scene.getNonDeletedElements(), frame.id); // keep elements' positions relative to their frames on frames resizing\n\n if (transformHandleType) {\n if (transformHandleType.includes(\"w\")) {\n elementsInFrame.forEach(element => {\n var _a, _b;\n\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n x: frame.x + (((_a = frameElementsOffsetsMap.get(frame.id + element.id)) === null || _a === void 0 ? void 0 : _a.x) || 0),\n y: frame.y + (((_b = frameElementsOffsetsMap.get(frame.id + element.id)) === null || _b === void 0 ? void 0 : _b.y) || 0)\n });\n });\n }\n\n if (transformHandleType.includes(\"n\")) {\n elementsInFrame.forEach(element => {\n var _a, _b;\n\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n x: frame.x + (((_a = frameElementsOffsetsMap.get(frame.id + element.id)) === null || _a === void 0 ? void 0 : _a.x) || 0),\n y: frame.y + (((_b = frameElementsOffsetsMap.get(frame.id + element.id)) === null || _b === void 0 ? void 0 : _b.y) || 0)\n });\n });\n }\n }\n\n (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getElementsInResizingFrame)(this.scene.getNonDeletedElements(), frame, this.state).forEach(element => elementsToHighlight.add(element));\n });\n this.setState({\n elementsToHighlight: [...elementsToHighlight]\n });\n return true;\n }\n\n return false;\n };\n\n this.getContextMenuItems = type => {\n const options = [];\n options.push(_actions__WEBPACK_IMPORTED_MODULE_5__.actionCopyAsPng, _actions__WEBPACK_IMPORTED_MODULE_5__.actionCopyAsSvg); // canvas contextMenu\n // -------------------------------------------------------------------------\n\n if (type === \"canvas\") {\n if (this.state.viewModeEnabled) {\n return [...options, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleGridMode, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleZenMode, _actions_actionToggleViewMode__WEBPACK_IMPORTED_MODULE_38__.actionToggleViewMode, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleStats];\n }\n\n return [_actions_actionClipboard__WEBPACK_IMPORTED_MODULE_53__.actionPaste, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionCopyAsPng, _actions__WEBPACK_IMPORTED_MODULE_5__.actionCopyAsSvg, _actions__WEBPACK_IMPORTED_MODULE_5__.copyText, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionSelectAll, _actions_actionElementLock__WEBPACK_IMPORTED_MODULE_49__.actionUnlockAllElements, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleGridMode, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleObjectsSnapMode, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleZenMode, _actions_actionToggleViewMode__WEBPACK_IMPORTED_MODULE_38__.actionToggleViewMode, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleStats];\n } // element contextMenu\n // -------------------------------------------------------------------------\n\n\n options.push(_actions__WEBPACK_IMPORTED_MODULE_5__.copyText);\n\n if (this.state.viewModeEnabled) {\n return [_actions__WEBPACK_IMPORTED_MODULE_5__.actionCopy, ...options];\n }\n\n return [_actions__WEBPACK_IMPORTED_MODULE_5__.actionCut, _actions__WEBPACK_IMPORTED_MODULE_5__.actionCopy, _actions_actionClipboard__WEBPACK_IMPORTED_MODULE_53__.actionPaste, _actions_actionFrame__WEBPACK_IMPORTED_MODULE_54__.actionSelectAllElementsInFrame, _actions_actionFrame__WEBPACK_IMPORTED_MODULE_54__.actionRemoveAllElementsFromFrame, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, ...options, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionCopyStyles, _actions__WEBPACK_IMPORTED_MODULE_5__.actionPasteStyles, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionGroup, _actions__WEBPACK_IMPORTED_MODULE_5__.actionUnbindText, _actions__WEBPACK_IMPORTED_MODULE_5__.actionBindText, _actions_actionBoundText__WEBPACK_IMPORTED_MODULE_59__.actionWrapTextInContainer, _actions__WEBPACK_IMPORTED_MODULE_5__.actionUngroup, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionAddToLibrary, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionSendBackward, _actions__WEBPACK_IMPORTED_MODULE_5__.actionBringForward, _actions__WEBPACK_IMPORTED_MODULE_5__.actionSendToBack, _actions__WEBPACK_IMPORTED_MODULE_5__.actionBringToFront, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionFlipHorizontal, _actions__WEBPACK_IMPORTED_MODULE_5__.actionFlipVertical, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleLinearEditor, _actions__WEBPACK_IMPORTED_MODULE_5__.actionLink, _actions__WEBPACK_IMPORTED_MODULE_5__.actionDuplicateSelection, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleElementLock, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionDeleteSelected];\n };\n\n this.handleWheel = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n event.preventDefault();\n\n if (isPanning) {\n return;\n }\n\n const {\n deltaX,\n deltaY\n } = event; // note that event.ctrlKey is necessary to handle pinch zooming\n\n if ( //zsviczian\n (event.metaKey || event.ctrlKey) && !this.state.allowWheelZoom || !(event.metaKey || event.ctrlKey) && this.state.allowWheelZoom) {\n const sign = Math.sign(deltaY);\n const MAX_STEP = _constants__WEBPACK_IMPORTED_MODULE_12__.ZOOM_STEP * 100;\n const absDelta = Math.abs(deltaY);\n let delta = deltaY;\n\n if (absDelta > MAX_STEP) {\n delta = MAX_STEP * sign;\n }\n\n let newZoom = this.state.zoom.value - delta / 100; // increase zoom steps the more zoomed-in we are (applies to >100% only)\n\n newZoom += Math.log10(Math.max(1, this.state.zoom.value)) * -sign * // reduced amplification for small deltas (small movements on a trackpad)\n Math.min(1, absDelta / 20);\n this.translateCanvas(state => Object.assign(Object.assign({}, (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_31__.getStateForZoom)({\n viewportX: this.lastViewportPosition.x,\n viewportY: this.lastViewportPosition.y,\n nextZoom: (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getNormalizedZoom)(newZoom)\n }, state)), {\n shouldCacheIgnoreZoom: true\n }));\n this.resetShouldCacheIgnoreZoomDebounced();\n return;\n } // scroll horizontally when shift pressed\n\n\n if (event.shiftKey) {\n this.translateCanvas(({\n zoom,\n scrollX\n }) => ({\n // on Mac, shift+wheel tends to result in deltaX\n scrollX: scrollX - (deltaY || deltaX) / zoom.value\n }));\n return;\n }\n\n this.translateCanvas(({\n zoom,\n scrollX,\n scrollY\n }) => ({\n scrollX: scrollX - deltaX / zoom.value,\n scrollY: scrollY - deltaY / zoom.value\n }));\n });\n\n this.savePointer = (x, y, button) => {\n var _a, _b;\n\n if (!x || !y) {\n return;\n }\n\n const pointer = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: x,\n clientY: y\n }, this.state);\n\n if (isNaN(pointer.x) || isNaN(pointer.y)) {// sometimes the pointer goes off screen\n }\n\n (_b = (_a = this.props).onPointerUpdate) === null || _b === void 0 ? void 0 : _b.call(_a, {\n pointer,\n button,\n pointersMap: gesture.pointers\n });\n };\n\n this.resetShouldCacheIgnoreZoomDebounced = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.debounce)(() => {\n if (!this.unmounted) {\n this.setState({\n shouldCacheIgnoreZoom: false\n });\n }\n }, 300);\n\n this.updateDOMRect = cb => {\n var _a;\n\n if ((_a = this.excalidrawContainerRef) === null || _a === void 0 ? void 0 : _a.current) {\n const excalidrawContainer = this.excalidrawContainerRef.current;\n const {\n width,\n height,\n left: offsetLeft,\n top: offsetTop\n } = excalidrawContainer.getBoundingClientRect();\n const {\n width: currentWidth,\n height: currentHeight,\n offsetTop: currentOffsetTop,\n offsetLeft: currentOffsetLeft\n } = this.state;\n\n if (width === currentWidth && height === currentHeight && offsetLeft === currentOffsetLeft && offsetTop === currentOffsetTop) {\n if (cb) {\n cb();\n }\n\n return;\n } //zsviczian\n\n\n if (width === 0 || height === 0) {\n if (cb) {\n cb();\n }\n\n return;\n }\n\n this.setState({\n width,\n height,\n offsetLeft,\n offsetTop\n }, () => {\n cb && cb();\n });\n }\n };\n\n this.refresh = () => {\n this.setState(Object.assign({}, this.getCanvasOffsets()));\n };\n\n const defaultAppState = (0,_appState__WEBPACK_IMPORTED_MODULE_10__.getDefaultAppState)();\n const {\n excalidrawRef,\n viewModeEnabled = false,\n zenModeEnabled = false,\n gridModeEnabled = false,\n objectsSnapModeEnabled = false,\n theme = defaultAppState.theme,\n name = defaultAppState.name,\n initState //zsviczian\n\n } = props;\n this.state = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, defaultAppState), {\n theme,\n isLoading: true\n }), this.getCanvasOffsets()), {\n viewModeEnabled,\n zenModeEnabled,\n objectsSnapModeEnabled,\n gridSize: gridModeEnabled ? _constants__WEBPACK_IMPORTED_MODULE_12__.GRID_SIZE : null,\n name,\n width: window.innerWidth,\n height: window.innerHeight\n }), initState !== null && initState !== void 0 ? initState : {});\n this.id = (0,nanoid__WEBPACK_IMPORTED_MODULE_68__.nanoid)();\n this.library = new _data_library__WEBPACK_IMPORTED_MODULE_14__[\"default\"](this);\n this.scene = new _scene_Scene__WEBPACK_IMPORTED_MODULE_30__[\"default\"]();\n this.canvas = document.createElement(\"canvas\");\n this.rc = roughjs_bin_rough__WEBPACK_IMPORTED_MODULE_3__[\"default\"].canvas(this.canvas);\n this.renderer = new _scene_Renderer__WEBPACK_IMPORTED_MODULE_65__.Renderer(this.scene);\n\n if (excalidrawRef) {\n const readyPromise = \"current\" in excalidrawRef && ((_a = excalidrawRef.current) === null || _a === void 0 ? void 0 : _a.readyPromise) || (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resolvablePromise)();\n const api = {\n ready: true,\n readyPromise,\n updateScene: this.updateScene,\n updateLibrary: this.library.updateLibrary,\n addFiles: this.addFiles,\n resetScene: this.resetScene,\n getSceneElementsIncludingDeleted: this.getSceneElementsIncludingDeleted,\n history: {\n clear: this.resetHistory\n },\n scrollToContent: this.scrollToContent,\n zoomToFit: this.zoomToFit,\n startLineEditor: this.startLineEditor,\n getSceneElements: this.getSceneElements,\n getAppState: () => this.state,\n getFiles: () => this.files,\n refresh: this.refresh,\n setToast: this.setToast,\n updateContainerSize: this.updateContainerSize,\n id: this.id,\n setLocalFont: this.setLocalFont,\n selectElements: this.selectElements,\n sendBackward: this.sendBackward,\n bringForward: this.bringForward,\n sendToBack: this.sendToBack,\n bringToFront: this.bringToFront,\n setMobileModeAllowed: this.setMobileModeAllowed,\n setActiveTool: this.setActiveTool,\n setCursor: this.setCursor,\n resetCursor: this.resetCursor,\n updateFrameRendering: this.updateFrameRendering,\n toggleSidebar: this.toggleSidebar,\n getHTMLIFrameElement: id => this.getHTMLIFrameElement(id) //zsviczian\n\n };\n\n if (typeof excalidrawRef === \"function\") {\n excalidrawRef(api);\n } else {\n excalidrawRef.current = api;\n }\n\n readyPromise.resolve(api);\n }\n\n this.excalidrawContainerValue = {\n container: this.excalidrawContainerRef.current,\n id: this.id\n };\n this.fonts = new _scene_Fonts__WEBPACK_IMPORTED_MODULE_50__.Fonts({\n scene: this.scene,\n onSceneUpdated: this.onSceneUpdated\n });\n this.history = new _history__WEBPACK_IMPORTED_MODULE_24__[\"default\"]();\n this.actionManager = new _actions_manager__WEBPACK_IMPORTED_MODULE_7__.ActionManager(this.syncActionResult, () => this.state, () => this.scene.getElementsIncludingDeleted(), this);\n this.actionManager.registerAll(_actions_register__WEBPACK_IMPORTED_MODULE_8__.actions);\n this.actionManager.registerAction((0,_actions_actionHistory__WEBPACK_IMPORTED_MODULE_6__.createUndoAction)(this.history));\n this.actionManager.registerAction((0,_actions_actionHistory__WEBPACK_IMPORTED_MODULE_6__.createRedoAction)(this.history));\n }\n\n onWindowMessage(event) {\n if (event.origin !== \"https://player.vimeo.com\" && event.origin !== \"https://www.youtube.com\") {\n return;\n }\n\n let data = null;\n\n try {\n data = JSON.parse(event.data);\n } catch (e) {}\n\n if (!data) {\n return;\n }\n\n switch (event.origin) {\n case \"https://player.vimeo.com\":\n //Allowing for multiple instances of Excalidraw running in the window\n if (data.method === \"paused\") {\n let source = null;\n const iframes = document.body.querySelectorAll(\"iframe.excalidraw__embeddable\");\n\n if (!iframes) {\n break;\n }\n\n for (const iframe of iframes) {\n if (iframe.contentWindow === event.source) {\n source = iframe.contentWindow;\n }\n }\n\n source === null || source === void 0 ? void 0 : source.postMessage(JSON.stringify({\n method: data.value ? \"play\" : \"pause\",\n value: true\n }), \"*\");\n }\n\n break;\n\n case \"https://www.youtube.com\":\n if (data.event === \"infoDelivery\" && data.info && data.id && typeof data.info.playerState === \"number\") {\n const id = data.id;\n const playerState = data.info.playerState;\n\n if (Object.values(_constants__WEBPACK_IMPORTED_MODULE_12__.YOUTUBE_STATES).includes(playerState)) {\n YOUTUBE_VIDEO_STATES.set(id, playerState);\n }\n }\n\n break;\n }\n }\n\n updateEmbeddableRef(id, ref) {\n if (ref) {\n this.iFrameRefs.set(id, ref);\n }\n }\n\n getHTMLIFrameElement(id) {\n return this.iFrameRefs.get(id);\n }\n\n handleEmbeddableCenterClick(element) {\n var _a, _b, _c, _d;\n\n if (((_a = this.state.activeEmbeddable) === null || _a === void 0 ? void 0 : _a.element) === element && ((_b = this.state.activeEmbeddable) === null || _b === void 0 ? void 0 : _b.state) === \"active\") {\n return;\n } // The delay serves two purposes\n // 1. To prevent first click propagating to iframe on mobile,\n // else the click will immediately start and stop the video\n // 2. If the user double clicks the frame center to activate it\n // without the delay youtube will immediately open the video\n // in fullscreen mode\n\n\n setTimeout(() => {\n this.setState({\n activeEmbeddable: {\n element,\n state: \"active\"\n },\n selectedElementIds: {\n [element.id]: true\n },\n draggingElement: null,\n selectionElement: null\n });\n }, 100);\n const iframe = this.getHTMLIFrameElement(element.id);\n\n if (!(iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow)) {\n return;\n }\n\n if (iframe.src.includes(\"youtube\")) {\n const state = YOUTUBE_VIDEO_STATES.get(element.id);\n\n if (!state) {\n YOUTUBE_VIDEO_STATES.set(element.id, _constants__WEBPACK_IMPORTED_MODULE_12__.YOUTUBE_STATES.UNSTARTED);\n iframe.contentWindow.postMessage(JSON.stringify({\n event: \"listening\",\n id: element.id\n }), \"*\");\n }\n\n switch (state) {\n case _constants__WEBPACK_IMPORTED_MODULE_12__.YOUTUBE_STATES.PLAYING:\n case _constants__WEBPACK_IMPORTED_MODULE_12__.YOUTUBE_STATES.BUFFERING:\n (_c = iframe.contentWindow) === null || _c === void 0 ? void 0 : _c.postMessage(JSON.stringify({\n event: \"command\",\n func: \"pauseVideo\",\n args: \"\"\n }), \"*\");\n break;\n\n default:\n (_d = iframe.contentWindow) === null || _d === void 0 ? void 0 : _d.postMessage(JSON.stringify({\n event: \"command\",\n func: \"playVideo\",\n args: \"\"\n }), \"*\");\n }\n }\n\n if (iframe.src.includes(\"player.vimeo.com\")) {\n iframe.contentWindow.postMessage(JSON.stringify({\n method: \"paused\" //video play/pause in onWindowMessage handler\n\n }), \"*\");\n }\n }\n\n isEmbeddableCenter(el, event, sceneX, sceneY) {\n var _a, _b;\n\n return el && !event.altKey && !event.shiftKey && !event.metaKey && !event.ctrlKey && (((_a = this.state.activeEmbeddable) === null || _a === void 0 ? void 0 : _a.element) !== el || ((_b = this.state.activeEmbeddable) === null || _b === void 0 ? void 0 : _b.state) === \"hover\" || !this.state.activeEmbeddable) && sceneX >= el.x + el.width / 3 && sceneX <= el.x + 2 * el.width / 3 && sceneY >= el.y + el.height / 3 && sceneY <= el.y + 2 * el.height / 3;\n }\n\n renderEmbeddables() {\n const scale = this.state.zoom.value;\n const normalizedWidth = this.state.width;\n const normalizedHeight = this.state.height;\n const embeddableElements = this.scene.getNonDeletedElements().filter(el => (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(el) && !!el.validated);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: embeddableElements.map(el => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n\n const {\n x,\n y\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.sceneCoordsToViewportCoords)({\n sceneX: el.x,\n sceneY: el.y\n }, this.state);\n const embedLink = (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.getEmbedLink)((0,_data_url__WEBPACK_IMPORTED_MODULE_47__.toValidURL)(el.link || \"\"));\n const isVisible = (0,_element_sizeHelpers__WEBPACK_IMPORTED_MODULE_27__.isElementInViewport)(el, normalizedWidth, normalizedHeight, this.state);\n const isActive = ((_a = this.state.activeEmbeddable) === null || _a === void 0 ? void 0 : _a.element) === el && ((_b = this.state.activeEmbeddable) === null || _b === void 0 ? void 0 : _b.state) === \"active\";\n const isHovered = ((_c = this.state.activeEmbeddable) === null || _c === void 0 ? void 0 : _c.element) === el && ((_d = this.state.activeEmbeddable) === null || _d === void 0 ? void 0 : _d.state) === \"hover\";\n const isWebview = //zsviczian\n this.props.renderWebview && (embedLink === null || embedLink === void 0 ? void 0 : embedLink.type) !== \"document\" && !((_f = (_e = embedLink === null || embedLink === void 0 ? void 0 : embedLink.link) === null || _e === void 0 ? void 0 : _e.startsWith) === null || _f === void 0 ? void 0 : _f.call(_e, \"https://player.vimeo.com\"));\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(\"excalidraw__embeddable-container\", {\n \"is-hovered\": isHovered\n }),\n style: {\n transform: isVisible ? `translate(${x - this.state.offsetLeft}px, ${y - this.state.offsetTop}px) scale(${scale})` : \"none\",\n display: isVisible ? \"block\" : \"none\",\n opacity: el.opacity / 100,\n [\"--embeddable-radius\"]: `${(0,_math__WEBPACK_IMPORTED_MODULE_28__.getCornerRadius)(Math.min(el.width, el.height), el)}px`\n }\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n //this is a hack that addresses isse with embedded excalidraw.com embeddable\n //https://github.com/excalidraw/excalidraw/pull/6691#issuecomment-1607383938\n\n /*ref={(ref) => {\r\n if (!this.excalidrawContainerRef.current) {\r\n return;\r\n }\r\n const container = this.excalidrawContainerRef.current;\r\n const sh = container.scrollHeight;\r\n const ch = container.clientHeight;\r\n if (sh !== ch) {\r\n container.style.height = `${sh}px`;\r\n setTimeout(() => {\r\n container.style.height = `100%`;\r\n });\r\n }\r\n }}*/\n className: \"excalidraw__embeddable-container__inner\",\n style: {\n width: isVisible ? `${el.width}px` : 0,\n height: isVisible ? `${el.height}px` : 0,\n transform: isVisible ? `rotate(${el.angle}rad)` : \"none\",\n pointerEvents: isActive ? _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_EVENTS.enabled : _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_EVENTS.disabled\n }\n }, {\n children: [isHovered && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"excalidraw__embeddable-hint\"\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"buttons.embeddableInteractionButton\")\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"excalidraw__embeddable__outer\",\n style: {\n padding: `${el.strokeWidth}px`\n }\n }, {\n children: (_j = (_h = (_g = this.props).renderEmbeddable) === null || _h === void 0 ? void 0 : _h.call(_g, el, this.state)) !== null && _j !== void 0 ? _j : isWebview ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"webview\", {\n ref: ref => this.updateEmbeddableRef(el.id, ref),\n className: \"excalidraw__embeddable\",\n src: (_k = embedLink === null || embedLink === void 0 ? void 0 : embedLink.link) !== null && _k !== void 0 ? _k : \"\",\n title: \"Excalidraw Embedded Content\",\n allowFullScreen: true\n }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"iframe\", {\n ref: ref => this.updateEmbeddableRef(el.id, ref),\n className: \"excalidraw__embeddable\",\n srcDoc: (embedLink === null || embedLink === void 0 ? void 0 : embedLink.type) === \"document\" ? embedLink.srcdoc(this.state.theme) : undefined,\n src: (embedLink === null || embedLink === void 0 ? void 0 : embedLink.type) !== \"document\" ? (_l = embedLink === null || embedLink === void 0 ? void 0 : embedLink.link) !== null && _l !== void 0 ? _l : \"\" : undefined,\n // https://stackoverflow.com/q/18470015\n scrolling: \"no\",\n referrerPolicy: \"no-referrer-when-downgrade\",\n title: \"Excalidraw Embedded Content\",\n allow: \"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\",\n allowFullScreen: true,\n sandbox: \"allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads\"\n })\n }))]\n }))\n }), el.id);\n })\n });\n }\n\n render() {\n var _a, _b, _c, _d, _e, _f;\n\n const selectedElements = this.scene.getSelectedElements(this.state);\n const {\n renderTopRightUI,\n renderCustomStats\n } = this.props;\n const versionNonce = this.scene.getVersionNonce();\n const {\n canvasElements,\n visibleElements\n } = this.renderer.getRenderableElements({\n versionNonce,\n zoom: this.state.zoom,\n offsetLeft: this.state.offsetLeft,\n offsetTop: this.state.offsetTop,\n scrollX: this.state.scrollX,\n scrollY: this.state.scrollY,\n height: this.state.height,\n width: this.state.width,\n editingElement: this.state.editingElement,\n pendingImageElementId: this.state.pendingImageElementId\n });\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(\"excalidraw excalidraw-container\", {\n \"excalidraw--view-mode\": this.state.viewModeEnabled,\n \"excalidraw--mobile\": this.device.isMobile || !(this.state.viewModeEnabled || this.state.zenModeEnabled) && this.state.trayModeEnabled //zsviczian\n\n }),\n style: {\n [\"--ui-pointerEvents\"]: this.state.selectionElement || this.state.draggingElement || this.state.resizingElement || this.state.editingElement && !(0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(this.state.editingElement) ? _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_EVENTS.disabled : _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_EVENTS.enabled\n },\n ref: this.excalidrawContainerRef,\n onDrop: this.handleAppOnDrop,\n tabIndex: 0,\n onKeyDown: this.props.handleKeyboardGlobally ? undefined : this.onKeyDown\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AppContext.Provider, Object.assign({\n value: this\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AppPropsContext.Provider, Object.assign({\n value: this.props\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ExcalidrawContainerContext.Provider, Object.assign({\n value: this.excalidrawContainerValue\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(DeviceContext.Provider, Object.assign({\n value: this.device\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ExcalidrawSetAppStateContext.Provider, Object.assign({\n value: this.setAppState\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ExcalidrawAppStateContext.Provider, Object.assign({\n value: this.state\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ExcalidrawElementsContext.Provider, Object.assign({\n value: this.scene.getNonDeletedElements()\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ExcalidrawActionManagerContext.Provider, Object.assign({\n value: this.actionManager\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_LayerUI__WEBPACK_IMPORTED_MODULE_36__[\"default\"], Object.assign({\n canvas: this.canvas,\n interactiveCanvas: this.interactiveCanvas,\n appState: this.state,\n files: this.files,\n setAppState: this.setAppState,\n actionManager: this.actionManager,\n elements: this.scene.getNonDeletedElements(),\n onLockToggle: this.toggleLock,\n onPenModeToggle: this.togglePenMode,\n onHandToolToggle: this.onHandToolToggle,\n langCode: (0,_i18n__WEBPACK_IMPORTED_MODULE_25__.getLanguage)().code,\n renderTopRightUI: renderTopRightUI,\n renderCustomStats: renderCustomStats,\n showExitZenModeBtn: typeof ((_a = this.props) === null || _a === void 0 ? void 0 : _a.zenModeEnabled) === \"undefined\" && this.state.zenModeEnabled,\n UIOptions: this.props.UIOptions,\n onImageAction: this.onImageAction,\n onExportImage: this.onExportImage,\n renderWelcomeScreen: !this.state.isLoading && this.state.showWelcomeScreen && this.state.activeTool.type === \"selection\" && !this.state.zenModeEnabled && !this.scene.getElementsIncludingDeleted().length,\n app: this\n }, {\n children: [this.props.children, this.state.activeTool.type === \"mermaid\" && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MermaidToExcalidraw__WEBPACK_IMPORTED_MODULE_67__[\"default\"], {\n selectedElements: this.scene.getSelectedElements(this.state)\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"excalidraw-textEditorContainer\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"excalidraw-contextMenuContainer\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"excalidraw-eye-dropper-container\"\n }), selectedElements.length === 1 && !this.state.contextMenu && this.state.showHyperlinkPopup && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.Hyperlink, {\n element: selectedElements[0],\n setAppState: this.setAppState,\n onLinkOpen: this.props.onLinkOpen,\n setToast: this.setToast\n }, selectedElements[0].id), this.state.toast !== null && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Toast__WEBPACK_IMPORTED_MODULE_37__.Toast, {\n message: this.state.toast.message,\n onClose: () => this.setToast(null),\n duration: this.state.toast.duration,\n closable: this.state.toast.closable\n }), this.state.contextMenu && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ContextMenu__WEBPACK_IMPORTED_MODULE_35__.ContextMenu, {\n items: this.state.contextMenu.items,\n top: this.state.contextMenu.top,\n left: this.state.contextMenu.left,\n actionManager: this.actionManager\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_canvases__WEBPACK_IMPORTED_MODULE_64__.StaticCanvas, {\n canvas: this.canvas,\n rc: this.rc,\n elements: canvasElements,\n visibleElements: visibleElements,\n versionNonce: versionNonce,\n selectionNonce: (_b = this.state.selectionElement) === null || _b === void 0 ? void 0 : _b.versionNonce,\n scale: window.devicePixelRatio,\n appState: this.state,\n renderConfig: {\n imageCache: this.imageCache,\n isExporting: false,\n renderGrid: true\n }\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_canvases__WEBPACK_IMPORTED_MODULE_64__.InteractiveCanvas, {\n containerRef: this.excalidrawContainerRef,\n canvas: this.interactiveCanvas,\n elements: canvasElements,\n visibleElements: visibleElements,\n selectedElements: selectedElements,\n versionNonce: versionNonce,\n selectionNonce: (_c = this.state.selectionElement) === null || _c === void 0 ? void 0 : _c.versionNonce,\n scale: window.devicePixelRatio,\n appState: this.state,\n renderInteractiveSceneCallback: this.renderInteractiveSceneCallback,\n handleCanvasRef: this.handleInteractiveCanvasRef,\n onContextMenu: this.handleCanvasContextMenu,\n onPointerMove: this.handleCanvasPointerMove,\n onPointerUp: this.handleCanvasPointerUp,\n onPointerCancel: this.removePointer,\n onTouchMove: this.handleTouchMove,\n onPointerDown: this.handleCanvasPointerDown,\n onDoubleClick: this.handleCanvasDoubleClick\n }), this.renderFrameNames(), ((_d = this.state.activeEmbeddable) === null || _d === void 0 ? void 0 : _d.state) === \"active\" && ( //zsviczian\n (_f = (_e = this.props).renderEmbeddableMenu) === null || _f === void 0 ? void 0 : _f.call(_e, this.state))]\n })), this.renderEmbeddables()]\n }))\n }))\n }))\n }))\n }))\n }))\n }))\n }));\n }\n\n async componentDidMount() {\n var _a, _b;\n\n this.unmounted = false;\n this.excalidrawContainerValue.container = this.excalidrawContainerRef.current;\n\n if (\"development\" === _constants__WEBPACK_IMPORTED_MODULE_12__.ENV.TEST || \"development\" !== \"production\") {\n const setState = this.setState.bind(this);\n Object.defineProperties(window.h, {\n state: {\n configurable: true,\n get: () => {\n return this.state;\n }\n },\n setState: {\n configurable: true,\n value: (...args) => {\n return this.setState(...args);\n }\n },\n app: {\n configurable: true,\n value: this\n },\n history: {\n configurable: true,\n value: this.history\n }\n });\n }\n\n this.scene.addCallback(this.onSceneUpdated);\n this.addEventListeners();\n\n if (this.props.autoFocus && this.excalidrawContainerRef.current) {\n this.focusContainer();\n }\n\n if (this.excalidrawContainerRef.current && // bounding rects don't work in tests so updating\n // the state on init would result in making the test enviro run\n // in mobile breakpoint (0 width/height), making everything fail\n !(0,_utils__WEBPACK_IMPORTED_MODULE_33__.isTestEnv)()) {\n this.refreshDeviceState(this.excalidrawContainerRef.current);\n }\n\n if (\"ResizeObserver\" in window && ((_a = this.excalidrawContainerRef) === null || _a === void 0 ? void 0 : _a.current)) {\n this.resizeObserver = new ResizeObserver(() => {\n // recompute device dimensions state\n // ---------------------------------------------------------------------\n this.refreshDeviceState(this.excalidrawContainerRef.current); // refresh offsets\n // ---------------------------------------------------------------------\n\n this.updateDOMRect();\n });\n (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.observe(this.excalidrawContainerRef.current);\n } else if (window.matchMedia) {\n const mdScreenQuery = window.matchMedia(`(max-width: ${_constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_WIDTH_PORTRAIT}px), (max-height: ${_constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_HEIGHT_LANDSCAPE}px) and (max-width: ${_constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_WIDTH_LANDSCAPE}px)`);\n const smScreenQuery = window.matchMedia(`(max-width: ${_constants__WEBPACK_IMPORTED_MODULE_12__.MQ_SM_MAX_WIDTH}px)`);\n const canDeviceFitSidebarMediaQuery = window.matchMedia(`(min-width: ${// NOTE this won't update if a different breakpoint is supplied\n // after mount\n this.props.UIOptions.dockedSidebarBreakpoint != null ? this.props.UIOptions.dockedSidebarBreakpoint : _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_RIGHT_SIDEBAR_MIN_WIDTH}px)`);\n\n const handler = () => {\n this.excalidrawContainerRef.current.getBoundingClientRect();\n this.device = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateObject)(this.device, {\n isSmScreen: smScreenQuery.matches,\n isMobile: mdScreenQuery.matches && this.allowMobileMode,\n canDeviceFitSidebar: canDeviceFitSidebarMediaQuery.matches\n });\n };\n\n mdScreenQuery.addListener(handler);\n\n this.detachIsMobileMqHandler = () => mdScreenQuery.removeListener(handler);\n }\n\n const searchParams = new URLSearchParams(window.location.search.slice(1));\n\n if (searchParams.has(\"web-share-target\")) {\n // Obtain a file that was shared via the Web Share Target API.\n this.restoreFileFromShare();\n } else {\n this.updateDOMRect(this.initializeScene);\n } // note that this check seems to always pass in localhost\n\n\n if ((0,_constants__WEBPACK_IMPORTED_MODULE_12__.isBrave)() && !(0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.isMeasureTextSupported)()) {\n this.setState({\n errorMessage: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_BraveMeasureTextError__WEBPACK_IMPORTED_MODULE_60__[\"default\"], {})\n });\n }\n }\n\n componentWillUnmount() {\n var _a;\n\n this.renderer.destroy();\n this.scene = new _scene_Scene__WEBPACK_IMPORTED_MODULE_30__[\"default\"]();\n this.renderer = new _scene_Renderer__WEBPACK_IMPORTED_MODULE_65__.Renderer(this.scene);\n this.files = {};\n this.imageCache.clear();\n (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();\n this.unmounted = true;\n this.removeEventListeners();\n this.scene.destroy();\n this.library.destroy();\n _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_66__.ShapeCache.destroy();\n _snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.destroy();\n clearTimeout(touchTimeout);\n _scene__WEBPACK_IMPORTED_MODULE_29__.isSomeElementSelected.clearCache();\n _groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements.clearCache();\n touchTimeout = 0;\n }\n\n removeEventListeners() {\n var _a, _b, _c, _d, _e;\n\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, this.removePointer);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.COPY, this.onCopy);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.PASTE, this.pasteFromClipboard);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.CUT, this.onCut);\n (_a = this.excalidrawContainerRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.WHEEL, this.onWheel);\n (_b = this.nearestScrollableContainer) === null || _b === void 0 ? void 0 : _b.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.SCROLL, this.onScroll);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYDOWN, this.onKeyDown, false);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.MOUSE_MOVE, this.updateCurrentCursorPosition, false);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYUP, this.onKeyUp);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.RESIZE, this.onResize, false);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.UNLOAD, this.onUnload, false);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.BLUR, this.onBlur, false);\n (_c = this.excalidrawContainerRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.DRAG_OVER, this.disableEvent, false);\n (_d = this.excalidrawContainerRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.DROP, this.disableEvent, false);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.GESTURE_START, this.onGestureStart, false);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.GESTURE_CHANGE, this.onGestureChange, false);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.GESTURE_END, this.onGestureEnd, false);\n (_e = this.detachIsMobileMqHandler) === null || _e === void 0 ? void 0 : _e.call(this);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.MESSAGE, this.onWindowMessage, false);\n }\n\n addEventListeners() {\n var _a, _b, _c, _d, _e;\n\n this.removeEventListeners();\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.MESSAGE, this.onWindowMessage, false);\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, this.removePointer); // #3553\n\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.COPY, this.onCopy);\n (_a = this.excalidrawContainerRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.WHEEL, this.onWheel, {\n passive: false\n });\n\n if (this.props.handleKeyboardGlobally) {\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYDOWN, this.onKeyDown, false);\n }\n\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYUP, this.onKeyUp, {\n passive: true\n });\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.MOUSE_MOVE, this.updateCurrentCursorPosition); // rerender text elements on font load to fix #637 && #1553\n\n (_c = (_b = document.fonts) === null || _b === void 0 ? void 0 : _b.addEventListener) === null || _c === void 0 ? void 0 : _c.call(_b, \"loadingdone\", event => {\n const loadedFontFaces = event.fontfaces;\n this.fonts.onFontsLoaded(loadedFontFaces);\n }); // Safari-only desktop pinch zoom\n\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.GESTURE_START, this.onGestureStart, false);\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.GESTURE_CHANGE, this.onGestureChange, false);\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.GESTURE_END, this.onGestureEnd, false);\n\n if (this.state.viewModeEnabled) {\n return;\n }\n\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.PASTE, this.pasteFromClipboard);\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.CUT, this.onCut);\n\n if (this.props.detectScroll) {\n this.nearestScrollableContainer = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.getNearestScrollableContainer)(this.excalidrawContainerRef.current);\n this.nearestScrollableContainer.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.SCROLL, this.onScroll);\n }\n\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.RESIZE, this.onResize, false);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.UNLOAD, this.onUnload, false);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.BLUR, this.onBlur, false);\n (_d = this.excalidrawContainerRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.DRAG_OVER, this.disableEvent, false);\n (_e = this.excalidrawContainerRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.DROP, this.disableEvent, false);\n }\n\n componentDidUpdate(prevProps, prevState) {\n var _a, _b, _c, _d, _e, _f;\n\n this.updateEmbeddables();\n\n if (!this.state.showWelcomeScreen && !this.scene.getElementsIncludingDeleted().length) {\n this.setState({\n showWelcomeScreen: true\n });\n }\n\n if (this.excalidrawContainerRef.current && prevProps.UIOptions.dockedSidebarBreakpoint !== this.props.UIOptions.dockedSidebarBreakpoint) {\n this.refreshDeviceState(this.excalidrawContainerRef.current);\n }\n\n if (prevState.scrollX !== this.state.scrollX || prevState.scrollY !== this.state.scrollY) {\n (_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.onScrollChange) === null || _b === void 0 ? void 0 : _b.call(_a, this.state.scrollX, this.state.scrollY);\n }\n\n if (Object.keys(this.state.selectedElementIds).length && (0,_appState__WEBPACK_IMPORTED_MODULE_10__.isEraserActive)(this.state)) {\n this.setState({\n activeTool: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, {\n type: \"selection\"\n })\n });\n }\n\n if (this.state.activeTool.type === \"eraser\" && prevState.theme !== this.state.theme) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setEraserCursor)(this.interactiveCanvas, this.state.theme);\n } // Hide hyperlink popup if shown when element type is not selection\n\n\n if (prevState.activeTool.type === \"selection\" && this.state.activeTool.type !== \"selection\" && this.state.showHyperlinkPopup) {\n this.setState({\n showHyperlinkPopup: false\n });\n }\n\n if (prevProps.langCode !== this.props.langCode) {\n this.updateLanguage();\n }\n\n if (prevProps.viewModeEnabled !== this.props.viewModeEnabled) {\n this.setState({\n viewModeEnabled: !!this.props.viewModeEnabled\n });\n }\n\n if (prevState.viewModeEnabled !== this.state.viewModeEnabled) {\n this.addEventListeners();\n this.deselectElements();\n }\n\n if (prevProps.zenModeEnabled !== this.props.zenModeEnabled) {\n this.setState({\n zenModeEnabled: !!this.props.zenModeEnabled\n });\n }\n\n if (prevProps.theme !== this.props.theme && this.props.theme) {\n this.setState({\n theme: this.props.theme\n });\n }\n\n if (prevProps.gridModeEnabled !== this.props.gridModeEnabled) {\n this.setState({\n gridSize: this.props.gridModeEnabled ? _constants__WEBPACK_IMPORTED_MODULE_12__.GRID_SIZE : null\n });\n }\n\n if (this.props.name && prevProps.name !== this.props.name) {\n this.setState({\n name: this.props.name\n });\n }\n\n (_c = this.excalidrawContainerRef.current) === null || _c === void 0 ? void 0 : _c.classList.toggle(\"theme--dark\", this.state.theme === \"dark\");\n\n if (this.state.editingLinearElement && !this.state.selectedElementIds[this.state.editingLinearElement.elementId]) {\n // defer so that the commitToHistory flag isn't reset via current update\n setTimeout(() => {\n // execute only if the condition still holds when the deferred callback\n // executes (it can be scheduled multiple times depending on how\n // many times the component renders)\n this.state.editingLinearElement && this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n });\n } // failsafe in case the state is being updated in incorrect order resulting\n // in the editingElement being now a deleted element\n\n\n if ((_d = this.state.editingElement) === null || _d === void 0 ? void 0 : _d.isDeleted) {\n this.setState({\n editingElement: null\n });\n }\n\n if (this.state.selectedLinearElement && !this.state.selectedElementIds[this.state.selectedLinearElement.elementId]) {\n // To make sure `selectedLinearElement` is in sync with `selectedElementIds`, however this shouldn't be needed once\n // we have a single API to update `selectedElementIds`\n this.setState({\n selectedLinearElement: null\n });\n }\n\n const {\n multiElement\n } = prevState;\n\n if (prevState.activeTool !== this.state.activeTool && multiElement != null && (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.isBindingEnabled)(this.state) && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBindingElement)(multiElement, false)) {\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.maybeBindLinearElement)(multiElement, this.state, this.scene, (0,_utils__WEBPACK_IMPORTED_MODULE_33__.tupleToCoors)(_element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.getPointAtIndexGlobalCoordinates(multiElement, -1)));\n }\n\n this.history.record(this.state, this.scene.getElementsIncludingDeleted()); // Do not notify consumers if we're still loading the scene. Among other\n // potential issues, this fixes a case where the tab isn't focused during\n // init, which would trigger onChange with empty elements, which would then\n // override whatever is in localStorage currently.\n\n if (!this.state.isLoading) {\n (_f = (_e = this.props).onChange) === null || _f === void 0 ? void 0 : _f.call(_e, this.scene.getElementsIncludingDeleted(), this.state, this.files);\n }\n }\n\n static resetTapTwice() {\n didTapTwice = false;\n }\n\n addTextFromPaste(text, isPlainPaste = false) {\n const {\n x,\n y\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: this.lastViewportPosition.x,\n clientY: this.lastViewportPosition.y\n }, this.state);\n const textElementProps = {\n x,\n y,\n strokeColor: this.state.currentItemStrokeColor,\n backgroundColor: this.state.currentItemBackgroundColor,\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roundness: null,\n roughness: this.state.currentItemRoughness,\n opacity: this.state.currentItemOpacity,\n text,\n rawText: text,\n fontSize: this.state.currentItemFontSize,\n fontFamily: this.state.currentItemFontFamily,\n textAlign: this.state.currentItemTextAlign,\n verticalAlign: _constants__WEBPACK_IMPORTED_MODULE_12__.DEFAULT_VERTICAL_ALIGN,\n locked: false\n };\n const LINE_GAP = 10;\n let currentY = y;\n const lines = isPlainPaste ? [text] : text.split(\"\\n\");\n const textElements = lines.reduce((acc, line, idx) => {\n var _a;\n\n const text = line.trim();\n const lineHeight = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getDefaultLineHeight)(textElementProps.fontFamily);\n\n if (text.length) {\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords({\n x,\n y: currentY\n });\n const element = (0,_element__WEBPACK_IMPORTED_MODULE_16__.newTextElement)(Object.assign(Object.assign({}, textElementProps), {\n x,\n y: currentY,\n text,\n rawText: text,\n //zsviczian\n lineHeight,\n frameId: topLayerFrame ? topLayerFrame.id : null\n }));\n acc.push(element);\n currentY += element.height + LINE_GAP;\n } else {\n const prevLine = (_a = lines[idx - 1]) === null || _a === void 0 ? void 0 : _a.trim(); // add paragraph only if previous line was not empty, IOW don't add\n // more than one empty line\n\n if (prevLine) {\n currentY += (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getLineHeightInPx)(textElementProps.fontSize, lineHeight) + LINE_GAP;\n }\n }\n\n return acc;\n }, []);\n\n if (textElements.length === 0) {\n return;\n }\n\n const frameId = textElements[0].frameId;\n\n if (frameId) {\n this.scene.insertElementsAtIndex(textElements, this.scene.getElementIndex(frameId));\n } else {\n this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted(), ...textElements]);\n }\n\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.fromEntries(textElements.map(el => [el.id, true])), this.state)\n });\n\n if (!isPlainPaste && textElements.length > 1 && PLAIN_PASTE_TOAST_SHOWN === false && !this.device.isMobile) {\n this.setToast({\n message: (0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"toast.pasteAsSingleElement\", {\n shortcut: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.getShortcutKey)(\"CtrlOrCmd+Shift+V\")\n }),\n duration: 5000\n });\n PLAIN_PASTE_TOAST_SHOWN = true;\n }\n\n this.history.resumeRecording();\n }\n\n handleTextWysiwyg(element, {\n isExistingElement = false\n }) {\n const updateElement = (text, originalText, isDeleted, rawText, link) => {\n this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted().map(_element => {\n if (_element.id === element.id && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(_element)) {\n return (0,_element__WEBPACK_IMPORTED_MODULE_16__.updateTextElement)(_element, {\n text,\n isDeleted,\n originalText,\n rawText: rawText !== null && rawText !== void 0 ? rawText : originalText,\n link\n });\n }\n\n return _element;\n })]);\n };\n\n if (isExistingElement && this.props.onBeforeTextEdit) {\n const text = this.props.onBeforeTextEdit(element);\n\n if (text) {\n this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted().map(_element => {\n if (_element.id === element.id && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(_element)) {\n element = (0,_element__WEBPACK_IMPORTED_MODULE_16__.updateTextElement)(_element, {\n text,\n isDeleted: false,\n originalText: text\n });\n return element;\n }\n\n return _element;\n })]);\n }\n }\n\n (0,_element__WEBPACK_IMPORTED_MODULE_16__.textWysiwyg)({\n id: element.id,\n canvas: this.canvas,\n getViewportCoords: (x, y) => {\n const {\n x: viewportX,\n y: viewportY\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.sceneCoordsToViewportCoords)({\n sceneX: x,\n sceneY: y\n }, this.state);\n return [viewportX - this.state.offsetLeft, viewportY - this.state.offsetTop];\n },\n onChange: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(text => {\n updateElement(text, text, false);\n\n if ((0,_element__WEBPACK_IMPORTED_MODULE_16__.isNonDeletedElement)(element)) {\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.updateBoundElements)(element);\n }\n }),\n onSubmit: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(({\n text,\n viaKeyboard,\n originalText\n }) => {\n const isDeleted = !text.trim();\n const rawText = originalText; //should this be originalText??\n\n let link = undefined;\n\n if (this.props.onBeforeTextSubmit) {\n const [updatedText, updatedOriginalText, l] = this.props.onBeforeTextSubmit(element, text, originalText, isDeleted);\n text = updatedText !== null && updatedText !== void 0 ? updatedText : text;\n originalText = updatedOriginalText !== null && updatedOriginalText !== void 0 ? updatedOriginalText : originalText;\n link = l;\n }\n\n updateElement(text, originalText, isDeleted, rawText, link); // select the created text element only if submitting via keyboard\n // (when submitting via click it should act as signal to deselect)\n\n if (!isDeleted && viaKeyboard) {\n const elementIdToSelect = element.containerId ? element.containerId : element.id;\n this.setState(prevState => ({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.assign(Object.assign({}, prevState.selectedElementIds), {\n [elementIdToSelect]: true\n }), prevState)\n }));\n }\n\n if (isDeleted) {\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.fixBindingsAfterDeletion)(this.scene.getNonDeletedElements(), [element]);\n }\n\n if (!isDeleted || isExistingElement) {\n this.history.resumeRecording();\n }\n\n this.setState({\n draggingElement: null,\n editingElement: null\n });\n\n if (this.state.activeTool.locked) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n }\n\n this.focusContainer();\n }),\n element,\n excalidrawContainer: this.excalidrawContainerRef.current,\n app: this\n }); // deselect all other elements when inserting text\n\n this.deselectElements(); // do an initial update to re-initialize element position since we were\n // modifying element's x/y for sake of editor (case: syncing to remote)\n\n updateElement(element.text, element.originalText, false);\n }\n\n deselectElements() {\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n selectedGroupIds: {},\n editingGroupId: null,\n activeEmbeddable: null\n });\n }\n\n getTextElementAtPosition(x, y) {\n const element = this.getElementAtPosition(x, y, {\n includeBoundTextElement: true\n });\n\n if (element && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(element) && !element.isDeleted) {\n return element;\n }\n\n return null;\n }\n\n getElementAtPosition(x, y, opts) {\n const allHitElements = this.getElementsAtPosition(x, y, opts === null || opts === void 0 ? void 0 : opts.includeBoundTextElement, opts === null || opts === void 0 ? void 0 : opts.includeLockedElements);\n\n if (allHitElements.length > 1) {\n if (opts === null || opts === void 0 ? void 0 : opts.preferSelected) {\n for (let index = allHitElements.length - 1; index > -1; index--) {\n if (this.state.selectedElementIds[allHitElements[index].id]) {\n return allHitElements[index];\n }\n }\n }\n\n const elementWithHighestZIndex = allHitElements[allHitElements.length - 1]; // If we're hitting element with highest z-index only on its bounding box\n // while also hitting other element figure, the latter should be considered.\n\n return (0,_element__WEBPACK_IMPORTED_MODULE_16__.isHittingElementBoundingBoxWithoutHittingElement)(elementWithHighestZIndex, this.state, this.frameNameBoundsCache, x, y) ? allHitElements[allHitElements.length - 2] : elementWithHighestZIndex;\n }\n\n if (allHitElements.length === 1) {\n return allHitElements[0];\n }\n\n return null;\n }\n\n getElementsAtPosition(x, y, includeBoundTextElement = false, includeLockedElements = false) {\n const elements = includeBoundTextElement && includeLockedElements ? this.scene.getNonDeletedElements() : this.scene.getNonDeletedElements().filter(element => (includeLockedElements || !element.locked) && (includeBoundTextElement || !((0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(element) && element.containerId)));\n return (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getElementsAtPosition)(elements, element => (0,_element__WEBPACK_IMPORTED_MODULE_16__.hitTest)(element, this.state, this.frameNameBoundsCache, x, y)).filter(element => {\n // hitting a frame's element from outside the frame is not considered a hit\n const containingFrame = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getContainingFrame)(element);\n return containingFrame && this.state.frameRendering.enabled && this.state.frameRendering.clip ? (0,_frame__WEBPACK_IMPORTED_MODULE_51__.isCursorInFrame)({\n x,\n y\n }, containingFrame) : true;\n });\n }\n\n handleHoverSelectedLinearElement(linearElementEditor, scenePointerX, scenePointerY) {\n const element = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.getElement(linearElementEditor.elementId);\n const boundTextElement = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getBoundTextElement)(element);\n\n if (!element) {\n return;\n }\n\n if (this.state.selectedLinearElement) {\n let hoverPointIndex = -1;\n let segmentMidPointHoveredCoords = null;\n\n if ((0,_element_collision__WEBPACK_IMPORTED_MODULE_44__.isHittingElementNotConsideringBoundingBox)(element, this.state, this.frameNameBoundsCache, [scenePointerX, scenePointerY])) {\n hoverPointIndex = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.getPointIndexUnderCursor(element, this.state.zoom, scenePointerX, scenePointerY);\n segmentMidPointHoveredCoords = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.getSegmentMidpointHitCoords(linearElementEditor, {\n x: scenePointerX,\n y: scenePointerY\n }, this.state);\n\n if (hoverPointIndex >= 0 || segmentMidPointHoveredCoords) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER);\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.MOVE);\n }\n } else if ((0,_element_transformHandles__WEBPACK_IMPORTED_MODULE_48__.shouldShowBoundingBox)([element], this.state) && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isHittingElementBoundingBoxWithoutHittingElement)(element, this.state, this.frameNameBoundsCache, scenePointerX, scenePointerY)) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.MOVE);\n } else if (boundTextElement && (0,_element__WEBPACK_IMPORTED_MODULE_16__.hitTest)(boundTextElement, this.state, this.frameNameBoundsCache, scenePointerX, scenePointerY)) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.MOVE);\n }\n\n if (this.state.selectedLinearElement.hoverPointIndex !== hoverPointIndex) {\n this.setState({\n selectedLinearElement: Object.assign(Object.assign({}, this.state.selectedLinearElement), {\n hoverPointIndex\n })\n });\n }\n\n if (!_element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.arePointsEqual(this.state.selectedLinearElement.segmentMidPointHoveredCoords, segmentMidPointHoveredCoords)) {\n this.setState({\n selectedLinearElement: Object.assign(Object.assign({}, this.state.selectedLinearElement), {\n segmentMidPointHoveredCoords\n })\n });\n }\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.AUTO);\n }\n }\n\n maybeCleanupAfterMissingPointerUp(event) {\n if (lastPointerUp !== null) {\n // Unfortunately, sometimes we don't get a pointerup after a pointerdown,\n // this can happen when a contextual menu or alert is triggered. In order to avoid\n // being in a weird state, we clean up on the next pointerdown\n lastPointerUp(event);\n }\n }\n\n updateGestureOnPointerDown(event) {\n gesture.pointers.set(event.pointerId, {\n x: event.clientX,\n y: event.clientY\n });\n\n if (gesture.pointers.size === 2) {\n gesture.lastCenter = (0,_gesture__WEBPACK_IMPORTED_MODULE_22__.getCenter)(gesture.pointers);\n gesture.initialScale = this.state.zoom.value;\n gesture.initialDistance = (0,_gesture__WEBPACK_IMPORTED_MODULE_22__.getDistance)(Array.from(gesture.pointers.values()));\n }\n }\n\n initialPointerDownState(event) {\n const origin = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n const selectedElements = this.scene.getSelectedElements(this.state);\n const [minX, minY, maxX, maxY] = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getCommonBounds)(selectedElements);\n return {\n origin,\n withCmdOrCtrl: event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD],\n originInGrid: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.tupleToCoors)((0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(origin.x, origin.y, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize)),\n scrollbars: (0,_scene__WEBPACK_IMPORTED_MODULE_29__.isOverScrollBars)(currentScrollBars, event.clientX - this.state.offsetLeft, event.clientY - this.state.offsetTop),\n // we need to duplicate because we'll be updating this state\n lastCoords: Object.assign({}, origin),\n originalElements: this.scene.getNonDeletedElements().reduce((acc, element) => {\n acc.set(element.id, (0,_element_newElement__WEBPACK_IMPORTED_MODULE_20__.deepCopyElement)(element));\n return acc;\n }, new Map()),\n resize: {\n handleType: false,\n isResizing: false,\n offset: {\n x: 0,\n y: 0\n },\n arrowDirection: \"origin\",\n center: {\n x: (maxX + minX) / 2,\n y: (maxY + minY) / 2\n }\n },\n hit: {\n element: null,\n allHitElements: [],\n wasAddedToSelection: false,\n hasBeenDuplicated: false,\n hasHitCommonBoundingBoxOfSelectedElements: this.isHittingCommonBoundingBoxOfSelectedElements(origin, selectedElements)\n },\n drag: {\n hasOccurred: false,\n offset: null\n },\n eventListeners: {\n onMove: null,\n onUp: null,\n onKeyUp: null,\n onKeyDown: null\n },\n boxSelection: {\n hasOccurred: false\n },\n elementIdsToErase: {}\n };\n } // Returns whether the event is a dragging a scrollbar\n\n\n handleDraggingScrollBar(event, pointerDownState) {\n if (!(pointerDownState.scrollbars.isOverEither && !this.state.multiElement)) {\n return false;\n }\n\n isDraggingScrollBar = true;\n pointerDownState.lastCoords.x = event.clientX;\n pointerDownState.lastCoords.y = event.clientY;\n const onPointerMove = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdatesThrottled)(event => {\n const target = event.target;\n\n if (!(target instanceof HTMLElement)) {\n return;\n }\n\n this.handlePointerMoveOverScrollbars(event, pointerDownState);\n });\n const onPointerUp = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(() => {\n isDraggingScrollBar = false;\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n lastPointerUp = null;\n this.setState({\n cursorButton: \"up\"\n });\n this.savePointer(event.clientX, event.clientY, \"up\");\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_MOVE, onPointerMove);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, onPointerUp);\n onPointerMove.flush();\n });\n lastPointerUp = onPointerUp;\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_MOVE, onPointerMove);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, onPointerUp);\n return true;\n }\n\n isASelectedElement(hitElement) {\n return hitElement != null && this.state.selectedElementIds[hitElement.id];\n }\n\n isHittingCommonBoundingBoxOfSelectedElements(point, selectedElements) {\n if (selectedElements.length < 2) {\n return false;\n } // How many pixels off the shape boundary we still consider a hit\n\n\n const threshold = 10 / this.state.zoom.value;\n const [x1, y1, x2, y2] = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getCommonBounds)(selectedElements);\n return point.x > x1 - threshold && point.x < x2 + threshold && point.y > y1 - threshold && point.y < y2 + threshold;\n }\n\n getCurrentItemRoundness(elementType) {\n return this.state.currentItemRoundness === \"round\" ? {\n type: (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isUsingAdaptiveRadius)(elementType) ? _constants__WEBPACK_IMPORTED_MODULE_12__.ROUNDNESS.ADAPTIVE_RADIUS : _constants__WEBPACK_IMPORTED_MODULE_12__.ROUNDNESS.PROPORTIONAL_RADIUS\n } : null;\n }\n\n maybeCacheReferenceSnapPoints(event, selectedElements, recomputeAnyways = false) {\n if ((0,_snapping__WEBPACK_IMPORTED_MODULE_58__.isSnappingEnabled)({\n event,\n appState: this.state,\n selectedElements\n }) && (recomputeAnyways || !_snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.getReferenceSnapPoints())) {\n _snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.setReferenceSnapPoints((0,_snapping__WEBPACK_IMPORTED_MODULE_58__.getReferenceSnapPoints)(this.scene.getNonDeletedElements(), selectedElements, this.state));\n }\n }\n\n maybeCacheVisibleGaps(event, selectedElements, recomputeAnyways = false) {\n if ((0,_snapping__WEBPACK_IMPORTED_MODULE_58__.isSnappingEnabled)({\n event,\n appState: this.state,\n selectedElements\n }) && (recomputeAnyways || !_snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.getVisibleGaps())) {\n _snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.setVisibleGaps((0,_snapping__WEBPACK_IMPORTED_MODULE_58__.getVisibleGaps)(this.scene.getNonDeletedElements(), selectedElements, this.state));\n }\n }\n\n onKeyDownFromPointerDownHandler(pointerDownState) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n if (this.maybeHandleResize(pointerDownState, event)) {\n return;\n }\n\n this.maybeDragNewGenericElement(pointerDownState, event);\n });\n }\n\n onKeyUpFromPointerDownHandler(pointerDownState) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n // Prevents focus from escaping excalidraw tab\n event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ALT && event.preventDefault();\n\n if (this.maybeHandleResize(pointerDownState, event)) {\n return;\n }\n\n this.maybeDragNewGenericElement(pointerDownState, event);\n });\n }\n\n onPointerMoveFromPointerDownHandler(pointerDownState) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdatesThrottled)(event => {\n var _a, _b; // We need to initialize dragOffsetXY only after we've updated\n // `state.selectedElementIds` on pointerDown. Doing it here in pointerMove\n // event handler should hopefully ensure we're already working with\n // the updated state.\n\n\n if (pointerDownState.drag.offset === null) {\n pointerDownState.drag.offset = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.tupleToCoors)((0,_element__WEBPACK_IMPORTED_MODULE_16__.getDragOffsetXY)(this.scene.getSelectedElements(this.state), pointerDownState.origin.x, pointerDownState.origin.y));\n }\n\n const target = event.target;\n\n if (!(target instanceof HTMLElement)) {\n return;\n }\n\n if (this.handlePointerMoveOverScrollbars(event, pointerDownState)) {\n return;\n }\n\n const pointerCoords = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n\n if ((0,_appState__WEBPACK_IMPORTED_MODULE_10__.isEraserActive)(this.state)) {\n this.handleEraser(event, pointerDownState, pointerCoords);\n return;\n }\n\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerCoords.x, pointerCoords.y, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize); // for arrows/lines, don't start dragging until a given threshold\n // to ensure we don't create a 2-point arrow by mistake when\n // user clicks mouse in a way that it moves a tiny bit (thus\n // triggering pointermove)\n\n if (!pointerDownState.drag.hasOccurred && (this.state.activeTool.type === \"arrow\" || this.state.activeTool.type === \"line\")) {\n if ((0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(pointerCoords.x, pointerCoords.y, pointerDownState.origin.x, pointerDownState.origin.y) < _constants__WEBPACK_IMPORTED_MODULE_12__.DRAGGING_THRESHOLD) {\n return;\n }\n }\n\n if (pointerDownState.resize.isResizing) {\n pointerDownState.lastCoords.x = pointerCoords.x;\n pointerDownState.lastCoords.y = pointerCoords.y;\n\n if (this.maybeHandleResize(pointerDownState, event)) {\n return true;\n }\n }\n\n if (this.state.selectedLinearElement) {\n const linearElementEditor = this.state.editingLinearElement || this.state.selectedLinearElement;\n\n if (_element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.shouldAddMidpoint(this.state.selectedLinearElement, pointerCoords, this.state)) {\n const ret = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.addMidpoint(this.state.selectedLinearElement, pointerCoords, this.state, !event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]);\n\n if (!ret) {\n return;\n } // Since we are reading from previous state which is not possible with\n // automatic batching in React 18 hence using flush sync to synchronously\n // update the state. Check https://github.com/excalidraw/excalidraw/pull/5508 for more details.\n\n\n (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.flushSync)(() => {\n if (this.state.selectedLinearElement) {\n this.setState({\n selectedLinearElement: Object.assign(Object.assign({}, this.state.selectedLinearElement), {\n pointerDownState: ret.pointerDownState,\n selectedPointsIndices: ret.selectedPointsIndices\n })\n });\n }\n\n if (this.state.editingLinearElement) {\n this.setState({\n editingLinearElement: Object.assign(Object.assign({}, this.state.editingLinearElement), {\n pointerDownState: ret.pointerDownState,\n selectedPointsIndices: ret.selectedPointsIndices\n })\n });\n }\n });\n return;\n } else if (linearElementEditor.pointerDownState.segmentMidpoint.value !== null && !linearElementEditor.pointerDownState.segmentMidpoint.added) {\n return;\n }\n\n const didDrag = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.handlePointDragging(event, this.state, pointerCoords.x, pointerCoords.y, (element, pointsSceneCoords) => {\n this.maybeSuggestBindingsForLinearElementAtCoords(element, pointsSceneCoords);\n }, linearElementEditor);\n\n if (didDrag) {\n pointerDownState.lastCoords.x = pointerCoords.x;\n pointerDownState.lastCoords.y = pointerCoords.y;\n pointerDownState.drag.hasOccurred = true;\n\n if (this.state.editingLinearElement && !this.state.editingLinearElement.isDragging) {\n this.setState({\n editingLinearElement: Object.assign(Object.assign({}, this.state.editingLinearElement), {\n isDragging: true\n })\n });\n }\n\n if (!this.state.selectedLinearElement.isDragging) {\n this.setState({\n selectedLinearElement: Object.assign(Object.assign({}, this.state.selectedLinearElement), {\n isDragging: true\n })\n });\n }\n\n return;\n }\n }\n\n const hasHitASelectedElement = pointerDownState.hit.allHitElements.some(element => this.isASelectedElement(element));\n const isSelectingPointsInLineEditor = this.state.editingLinearElement && event.shiftKey && this.state.editingLinearElement.elementId === ((_a = pointerDownState.hit.element) === null || _a === void 0 ? void 0 : _a.id);\n\n if ((hasHitASelectedElement || pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements) && !isSelectingPointsInLineEditor) {\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (selectedElements.every(element => element.locked)) {\n return;\n }\n\n const selectedElementsHasAFrame = selectedElements.find(e => (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isFrameElement)(e));\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords(pointerCoords);\n this.setState({\n frameToHighlight: topLayerFrame && !selectedElementsHasAFrame ? topLayerFrame : null\n }); // Marking that click was used for dragging to check\n // if elements should be deselected on pointerup\n\n pointerDownState.drag.hasOccurred = true;\n this.setState({\n selectedElementsAreBeingDragged: true\n }); // prevent dragging even if we're no longer holding cmd/ctrl otherwise\n // it would have weird results (stuff jumping all over the screen)\n // Checking for editingElement to avoid jump while editing on mobile #6503\n\n if (selectedElements.length > 0 && !pointerDownState.withCmdOrCtrl && !this.state.editingElement && ((_b = this.state.activeEmbeddable) === null || _b === void 0 ? void 0 : _b.state) !== \"active\") {\n const dragOffset = {\n x: pointerCoords.x - pointerDownState.origin.x,\n y: pointerCoords.y - pointerDownState.origin.y\n };\n const originalElements = [...pointerDownState.originalElements.values()]; // We only drag in one direction if shift is pressed\n\n const lockDirection = event.shiftKey;\n\n if (lockDirection) {\n const distanceX = Math.abs(dragOffset.x);\n const distanceY = Math.abs(dragOffset.y);\n const lockX = lockDirection && distanceX < distanceY;\n const lockY = lockDirection && distanceX > distanceY;\n\n if (lockX) {\n dragOffset.x = 0;\n }\n\n if (lockY) {\n dragOffset.y = 0;\n }\n } // Snap cache *must* be synchronously popuplated before initial drag,\n // otherwise the first drag even will not snap, causing a jump before\n // it snaps to its position if previously snapped already.\n\n\n this.maybeCacheVisibleGaps(event, selectedElements);\n this.maybeCacheReferenceSnapPoints(event, selectedElements);\n const {\n snapOffset,\n snapLines\n } = (0,_snapping__WEBPACK_IMPORTED_MODULE_58__.snapDraggedElements)((0,_scene__WEBPACK_IMPORTED_MODULE_29__.getSelectedElements)(originalElements, this.state), dragOffset, this.state, event);\n this.setState({\n snapLines\n }); // when we're editing the name of a frame, we want the user to be\n // able to select and interact with the text input\n\n !this.state.editingFrame && (0,_element__WEBPACK_IMPORTED_MODULE_16__.dragSelectedElements)(pointerDownState, selectedElements, dragOffset, this.state, this.scene, snapOffset, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize);\n this.maybeSuggestBindingForAll(selectedElements); // We duplicate the selected element if alt is pressed on pointer move\n\n if (event.altKey && !pointerDownState.hit.hasBeenDuplicated) {\n // Move the currently selected elements to the top of the z index stack, and\n // put the duplicates where the selected elements used to be.\n // (the origin point where the dragging started)\n pointerDownState.hit.hasBeenDuplicated = true;\n const nextElements = [];\n const elementsToAppend = [];\n const groupIdMap = new Map();\n const oldIdToDuplicatedId = new Map();\n const hitElement = pointerDownState.hit.element;\n const selectedElementIds = new Set(this.scene.getSelectedElements({\n selectedElementIds: this.state.selectedElementIds,\n includeBoundTextElement: true,\n includeElementsInFrames: true\n }).map(element => element.id));\n const elements = this.scene.getElementsIncludingDeleted();\n\n for (const element of elements) {\n if (selectedElementIds.has(element.id) || // case: the state.selectedElementIds might not have been\n // updated yet by the time this mousemove event is fired\n element.id === (hitElement === null || hitElement === void 0 ? void 0 : hitElement.id) && pointerDownState.hit.wasAddedToSelection) {\n const duplicatedElement = (0,_element__WEBPACK_IMPORTED_MODULE_16__.duplicateElement)(this.state.editingGroupId, groupIdMap, element);\n const origElement = pointerDownState.originalElements.get(element.id);\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(duplicatedElement, {\n x: origElement.x,\n y: origElement.y\n }); // put duplicated element to pointerDownState.originalElements\n // so that we can snap to the duplicated element without releasing\n\n pointerDownState.originalElements.set(duplicatedElement.id, duplicatedElement);\n nextElements.push(duplicatedElement);\n elementsToAppend.push(element);\n oldIdToDuplicatedId.set(element.id, duplicatedElement.id);\n } else {\n nextElements.push(element);\n }\n }\n\n const nextSceneElements = [...nextElements, ...elementsToAppend];\n (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.bindTextToShapeAfterDuplication)(nextElements, elementsToAppend, oldIdToDuplicatedId);\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.fixBindingsAfterDuplication)(nextSceneElements, elementsToAppend, oldIdToDuplicatedId, \"duplicatesServeAsOld\");\n (0,_frame__WEBPACK_IMPORTED_MODULE_51__.bindElementsToFramesAfterDuplication)(nextSceneElements, elementsToAppend, oldIdToDuplicatedId);\n this.scene.replaceAllElements(nextSceneElements);\n this.maybeCacheVisibleGaps(event, selectedElements, true);\n this.maybeCacheReferenceSnapPoints(event, selectedElements, true);\n }\n\n return;\n }\n } // It is very important to read this.state within each move event,\n // otherwise we would read a stale one!\n\n\n const draggingElement = this.state.draggingElement;\n\n if (!draggingElement) {\n return;\n }\n\n if (draggingElement.type === \"freedraw\") {\n const points = draggingElement.points;\n const dx = pointerCoords.x - draggingElement.x;\n const dy = pointerCoords.y - draggingElement.y;\n const lastPoint = points.length > 0 && points[points.length - 1];\n const discardPoint = lastPoint && lastPoint[0] === dx && lastPoint[1] === dy;\n\n if (!discardPoint) {\n const strokeOptions = this.state.currentStrokeOptions; //zsviczian\n\n const pressures = draggingElement.simulatePressure ? draggingElement.pressures : [//zsviczian\n ...draggingElement.pressures, (strokeOptions === null || strokeOptions === void 0 ? void 0 : strokeOptions.constantPressure) ? 1 : event.pressure];\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(draggingElement, {\n points: [...points, [dx, dy]],\n pressures\n });\n }\n } else if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(draggingElement)) {\n pointerDownState.drag.hasOccurred = true;\n this.setState({\n selectedElementsAreBeingDragged: true\n });\n const points = draggingElement.points;\n let dx = gridX - draggingElement.x;\n let dy = gridY - draggingElement.y;\n\n if ((0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldRotateWithDiscreteAngle)(event) && points.length === 2) {\n ({\n width: dx,\n height: dy\n } = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getLockedLinearCursorAlignSize)(draggingElement.x, draggingElement.y, pointerCoords.x, pointerCoords.y));\n }\n\n if (points.length === 1) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(draggingElement, {\n points: [...points, [dx, dy]]\n });\n } else if (points.length === 2) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(draggingElement, {\n points: [...points.slice(0, -1), [dx, dy]]\n });\n }\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBindingElement)(draggingElement, false)) {\n // When creating a linear element by dragging\n this.maybeSuggestBindingsForLinearElementAtCoords(draggingElement, [pointerCoords], this.state.startBoundElement);\n }\n } else {\n pointerDownState.lastCoords.x = pointerCoords.x;\n pointerDownState.lastCoords.y = pointerCoords.y;\n this.maybeDragNewGenericElement(pointerDownState, event);\n }\n\n if (this.state.activeTool.type === \"selection\") {\n pointerDownState.boxSelection.hasOccurred = true;\n const elements = this.scene.getNonDeletedElements(); // box-select line editor points\n\n if (this.state.editingLinearElement) {\n _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.handleBoxSelection(event, this.state, this.setState.bind(this)); // regular box-select\n } else {\n let shouldReuseSelection = true;\n\n if (!event.shiftKey && (0,_scene__WEBPACK_IMPORTED_MODULE_29__.isSomeElementSelected)(elements, this.state)) {\n if (pointerDownState.withCmdOrCtrl && pointerDownState.hit.element) {\n this.setState(prevState => (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)(Object.assign(Object.assign({}, prevState), {\n selectedElementIds: {\n [pointerDownState.hit.element.id]: true\n }\n }), this.scene.getNonDeletedElements(), prevState, this));\n } else {\n shouldReuseSelection = false;\n }\n }\n\n const elementsWithinSelection = (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getElementsWithinSelection)(elements, draggingElement);\n this.setState(prevState => {\n const nextSelectedElementIds = Object.assign(Object.assign({}, shouldReuseSelection && prevState.selectedElementIds), elementsWithinSelection.reduce((acc, element) => {\n acc[element.id] = true;\n return acc;\n }, {}));\n\n if (pointerDownState.hit.element) {\n // if using ctrl/cmd, select the hitElement only if we\n // haven't box-selected anything else\n if (!elementsWithinSelection.length) {\n nextSelectedElementIds[pointerDownState.hit.element.id] = true;\n } else {\n delete nextSelectedElementIds[pointerDownState.hit.element.id];\n }\n }\n\n prevState = !shouldReuseSelection ? Object.assign(Object.assign({}, prevState), {\n selectedGroupIds: {},\n editingGroupId: null\n }) : prevState;\n return Object.assign(Object.assign({}, (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: prevState.editingGroupId,\n selectedElementIds: nextSelectedElementIds\n }, this.scene.getNonDeletedElements(), prevState, this)), {\n // select linear element only when we haven't box-selected anything else\n selectedLinearElement: elementsWithinSelection.length === 1 && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(elementsWithinSelection[0]) ? new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(elementsWithinSelection[0], this.scene) : null,\n showHyperlinkPopup: elementsWithinSelection.length === 1 && (elementsWithinSelection[0].link || (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(elementsWithinSelection[0])) ? \"info\" : false\n });\n });\n }\n }\n });\n } // Returns whether the pointer move happened over either scrollbar\n\n\n handlePointerMoveOverScrollbars(event, pointerDownState) {\n if (pointerDownState.scrollbars.isOverHorizontal) {\n const x = event.clientX;\n const dx = x - pointerDownState.lastCoords.x;\n this.translateCanvas({\n scrollX: this.state.scrollX - dx / this.state.zoom.value\n });\n pointerDownState.lastCoords.x = x;\n return true;\n }\n\n if (pointerDownState.scrollbars.isOverVertical) {\n const y = event.clientY;\n const dy = y - pointerDownState.lastCoords.y;\n this.translateCanvas({\n scrollY: this.state.scrollY - dy / this.state.zoom.value\n });\n pointerDownState.lastCoords.y = y;\n return true;\n }\n\n return false;\n }\n\n onPointerUpFromPointerDownHandler(pointerDownState) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(childEvent => {\n var _a, _b, _c, _d, _e, _f;\n\n if (pointerDownState.eventListeners.onMove) {\n pointerDownState.eventListeners.onMove.flush();\n }\n\n const {\n draggingElement,\n resizingElement,\n multiElement,\n activeTool,\n isResizing,\n isRotating\n } = this.state;\n this.setState({\n isResizing: false,\n isRotating: false,\n resizingElement: null,\n selectionElement: null,\n frameToHighlight: null,\n elementsToHighlight: null,\n cursorButton: \"up\",\n // text elements are reset on finalize, and resetting on pointerup\n // may cause issues with double taps\n editingElement: multiElement || (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(this.state.editingElement) ? this.state.editingElement : null,\n snapLines: [],\n originSnapOffset: null\n });\n _snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.setReferenceSnapPoints(null);\n _snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.setVisibleGaps(null);\n this.savePointer(childEvent.clientX, childEvent.clientY, \"up\");\n this.setState({\n selectedElementsAreBeingDragged: false\n }); // Handle end of dragging a point of a linear element, might close a loop\n // and sets binding element\n\n if (this.state.editingLinearElement) {\n if (!pointerDownState.boxSelection.hasOccurred && ((_b = (_a = pointerDownState.hit) === null || _a === void 0 ? void 0 : _a.element) === null || _b === void 0 ? void 0 : _b.id) !== this.state.editingLinearElement.elementId) {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n } else {\n const editingLinearElement = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.handlePointerUp(childEvent, this.state.editingLinearElement, this.state);\n\n if (editingLinearElement !== this.state.editingLinearElement) {\n this.setState({\n editingLinearElement,\n suggestedBindings: []\n });\n }\n }\n } else if (this.state.selectedLinearElement) {\n if (((_d = (_c = pointerDownState.hit) === null || _c === void 0 ? void 0 : _c.element) === null || _d === void 0 ? void 0 : _d.id) !== this.state.selectedLinearElement.elementId) {\n const selectedELements = this.scene.getSelectedElements(this.state); // set selectedLinearElement to null if there is more than one element selected since we don't want to show linear element handles\n\n if (selectedELements.length > 1) {\n this.setState({\n selectedLinearElement: null\n });\n }\n } else {\n const linearElementEditor = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.handlePointerUp(childEvent, this.state.selectedLinearElement, this.state);\n const {\n startBindingElement,\n endBindingElement\n } = linearElementEditor;\n const element = this.scene.getElement(linearElementEditor.elementId);\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBindingElement)(element)) {\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.bindOrUnbindLinearElement)(element, startBindingElement, endBindingElement);\n }\n\n if (linearElementEditor !== this.state.selectedLinearElement) {\n this.setState({\n selectedLinearElement: Object.assign(Object.assign({}, linearElementEditor), {\n selectedPointsIndices: null\n }),\n suggestedBindings: []\n });\n }\n }\n }\n\n lastPointerUp = null;\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_MOVE, pointerDownState.eventListeners.onMove);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, pointerDownState.eventListeners.onUp);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYDOWN, pointerDownState.eventListeners.onKeyDown);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYUP, pointerDownState.eventListeners.onKeyUp);\n\n if (this.state.pendingImageElementId) {\n this.setState({\n pendingImageElementId: null\n });\n }\n\n if ((draggingElement === null || draggingElement === void 0 ? void 0 : draggingElement.type) === \"freedraw\") {\n const pointerCoords = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(childEvent, this.state);\n const points = draggingElement.points;\n let dx = pointerCoords.x - draggingElement.x;\n let dy = pointerCoords.y - draggingElement.y; // Allows dots to avoid being flagged as infinitely small\n\n if (dx === points[0][0] && dy === points[0][1]) {\n dy += 0.0001;\n dx += 0.0001;\n }\n\n const pressures = draggingElement.simulatePressure ? [] : [...draggingElement.pressures, childEvent.pressure];\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(draggingElement, {\n points: [...points, [dx, dy]],\n pressures,\n lastCommittedPoint: [dx, dy]\n });\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n return;\n }\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isImageElement)(draggingElement)) {\n const imageElement = draggingElement;\n\n try {\n this.initializeImageDimensions(imageElement);\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({\n [imageElement.id]: true\n }, this.state)\n }, () => {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n });\n } catch (error) {\n console.error(error);\n this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter(el => el.id !== imageElement.id));\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n }\n\n return;\n }\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(draggingElement)) {\n if (draggingElement.points.length > 1) {\n this.history.resumeRecording();\n }\n\n const pointerCoords = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(childEvent, this.state);\n\n if (!pointerDownState.drag.hasOccurred && draggingElement && !multiElement) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(draggingElement, {\n points: [...draggingElement.points, [pointerCoords.x - draggingElement.x, pointerCoords.y - draggingElement.y]]\n });\n this.setState({\n multiElement: draggingElement,\n editingElement: this.state.draggingElement\n });\n } else if (pointerDownState.drag.hasOccurred && !multiElement) {\n if ((0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.isBindingEnabled)(this.state) && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBindingElement)(draggingElement, false)) {\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.maybeBindLinearElement)(draggingElement, this.state, this.scene, pointerCoords);\n }\n\n this.setState({\n suggestedBindings: [],\n startBoundElement: null\n });\n\n if (!activeTool.locked) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n this.setState(prevState => ({\n draggingElement: null,\n activeTool: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, {\n type: \"selection\"\n }),\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.assign(Object.assign({}, prevState.selectedElementIds), {\n [draggingElement.id]: true\n }), prevState),\n selectedLinearElement: new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(draggingElement, this.scene)\n }));\n } else {\n this.setState(prevState => ({\n draggingElement: null\n }));\n }\n }\n\n return;\n }\n\n if (activeTool.type !== \"selection\" && draggingElement && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isInvisiblySmallElement)(draggingElement)) {\n // remove invisible element which was added in onPointerDown\n if (draggingElement.type !== \"selection\") {\n //zsviczian (mermaid link click fix)\n this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().slice(0, -1));\n }\n\n this.setState({\n draggingElement: null\n });\n return;\n }\n\n if (draggingElement) {\n if (pointerDownState.drag.hasOccurred) {\n const sceneCoords = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(childEvent, this.state); // when editing the points of a linear element, we check if the\n // linear element still is in the frame afterwards\n // if not, the linear element will be removed from its frame (if any)\n\n if (this.state.selectedLinearElement && this.state.selectedLinearElement.isDragging) {\n const linearElement = this.scene.getElement(this.state.selectedLinearElement.elementId);\n\n if (linearElement === null || linearElement === void 0 ? void 0 : linearElement.frameId) {\n const frame = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getContainingFrame)(linearElement);\n\n if (frame && linearElement) {\n if (!(0,_frame__WEBPACK_IMPORTED_MODULE_51__.elementOverlapsWithFrame)(linearElement, frame)) {\n // remove the linear element from all groups\n // before removing it from the frame as well\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(linearElement, {\n groupIds: []\n });\n this.scene.replaceAllElements((0,_frame__WEBPACK_IMPORTED_MODULE_51__.removeElementsFromFrame)(this.scene.getElementsIncludingDeleted(), [linearElement], this.state));\n }\n }\n }\n } else {\n // update the relationships between selected elements and frames\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords(sceneCoords);\n const selectedElements = this.scene.getSelectedElements(this.state);\n let nextElements = this.scene.getElementsIncludingDeleted();\n\n const updateGroupIdsAfterEditingGroup = elements => {\n if (elements.length > 0) {\n for (const element of elements) {\n const index = element.groupIds.indexOf(this.state.editingGroupId);\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n groupIds: element.groupIds.slice(0, index)\n }, false);\n }\n\n nextElements.forEach(element => {\n if (element.groupIds.length && (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getElementsInGroup)(nextElements, element.groupIds[element.groupIds.length - 1]).length < 2) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n groupIds: []\n }, false);\n }\n });\n this.setState({\n editingGroupId: null\n });\n }\n };\n\n if (topLayerFrame && !this.state.selectedElementIds[topLayerFrame.id]) {\n const elementsToAdd = selectedElements.filter(element => element.frameId !== topLayerFrame.id && (0,_frame__WEBPACK_IMPORTED_MODULE_51__.isElementInFrame)(element, nextElements, this.state));\n\n if (this.state.editingGroupId) {\n updateGroupIdsAfterEditingGroup(elementsToAdd);\n }\n\n nextElements = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.addElementsToFrame)(nextElements, elementsToAdd, topLayerFrame);\n } else if (!topLayerFrame) {\n if (this.state.editingGroupId) {\n const elementsToRemove = selectedElements.filter(element => element.frameId && !(0,_frame__WEBPACK_IMPORTED_MODULE_51__.isElementInFrame)(element, nextElements, this.state));\n updateGroupIdsAfterEditingGroup(elementsToRemove);\n }\n }\n\n nextElements = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.updateFrameMembershipOfSelectedElements)(nextElements, this.state, this);\n this.scene.replaceAllElements(nextElements);\n }\n }\n\n if (draggingElement.type === \"frame\") {\n const elementsInsideFrame = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getElementsInNewFrame)(this.scene.getElementsIncludingDeleted(), draggingElement);\n this.scene.replaceAllElements((0,_frame__WEBPACK_IMPORTED_MODULE_51__.addElementsToFrame)(this.scene.getElementsIncludingDeleted(), elementsInsideFrame, draggingElement));\n }\n\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(draggingElement, (0,_element__WEBPACK_IMPORTED_MODULE_16__.getNormalizedDimensions)(draggingElement));\n }\n\n if (resizingElement) {\n this.history.resumeRecording();\n }\n\n if (resizingElement && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isInvisiblySmallElement)(resizingElement)) {\n this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter(el => el.id !== resizingElement.id));\n } // handle frame membership for resizing frames and/or selected elements\n\n\n if (pointerDownState.resize.isResizing) {\n let nextElements = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.updateFrameMembershipOfSelectedElements)(this.scene.getElementsIncludingDeleted(), this.state, this);\n const selectedFrames = this.scene.getSelectedElements(this.state).filter(element => element.type === \"frame\");\n\n for (const frame of selectedFrames) {\n nextElements = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.replaceAllElementsInFrame)(nextElements, (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getElementsInResizingFrame)(this.scene.getElementsIncludingDeleted(), frame, this.state), frame, this.state);\n }\n\n this.scene.replaceAllElements(nextElements);\n } // Code below handles selection when element(s) weren't\n // drag or added to selection on pointer down phase.\n\n\n const hitElement = pointerDownState.hit.element;\n\n if (((_e = this.state.selectedLinearElement) === null || _e === void 0 ? void 0 : _e.elementId) !== (hitElement === null || hitElement === void 0 ? void 0 : hitElement.id) && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(hitElement)) {\n const selectedELements = this.scene.getSelectedElements(this.state); // set selectedLinearElement when no other element selected except\n // the one we've hit\n\n if (selectedELements.length === 1) {\n this.setState({\n selectedLinearElement: new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(hitElement, this.scene)\n });\n }\n }\n\n if ((0,_appState__WEBPACK_IMPORTED_MODULE_10__.isEraserActive)(this.state)) {\n const draggedDistance = (0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(this.lastPointerDown.clientX, this.lastPointerDown.clientY, this.lastPointerUp.clientX, this.lastPointerUp.clientY);\n\n if (draggedDistance === 0) {\n const scenePointer = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: this.lastPointerUp.clientX,\n clientY: this.lastPointerUp.clientY\n }, this.state);\n const hitElements = this.getElementsAtPosition(scenePointer.x, scenePointer.y);\n hitElements.forEach(hitElement => pointerDownState.elementIdsToErase[hitElement.id] = {\n erase: true,\n opacity: hitElement.opacity\n });\n }\n\n this.eraseElements(pointerDownState);\n return;\n } else if (Object.keys(pointerDownState.elementIdsToErase).length) {\n this.restoreReadyToEraseElements(pointerDownState);\n }\n\n if (hitElement && !pointerDownState.drag.hasOccurred && !pointerDownState.hit.wasAddedToSelection && ( // if we're editing a line, pointerup shouldn't switch selection if\n // box selected\n !this.state.editingLinearElement || !pointerDownState.boxSelection.hasOccurred)) {\n // when inside line editor, shift selects points instead\n if (childEvent.shiftKey && !this.state.editingLinearElement) {\n if (this.state.selectedElementIds[hitElement.id]) {\n if ((0,_groups__WEBPACK_IMPORTED_MODULE_23__.isSelectedViaGroup)(this.state, hitElement)) {\n this.setState(_prevState => {\n const nextSelectedElementIds = Object.assign({}, _prevState.selectedElementIds); // We want to unselect all groups hitElement is part of\n // as well as all elements that are part of the groups\n // hitElement is part of\n\n for (const groupedElement of hitElement.groupIds.flatMap(groupId => (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getElementsInGroup)(this.scene.getNonDeletedElements(), groupId))) {\n delete nextSelectedElementIds[groupedElement.id];\n }\n\n return {\n selectedGroupIds: Object.assign(Object.assign({}, _prevState.selectedElementIds), hitElement.groupIds.map(gId => ({\n [gId]: false\n })).reduce((prev, acc) => Object.assign(Object.assign({}, prev), acc), {})),\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(nextSelectedElementIds, _prevState)\n };\n }); // if not gragging a linear element point (outside editor)\n } else if (!((_f = this.state.selectedLinearElement) === null || _f === void 0 ? void 0 : _f.isDragging)) {\n // remove element from selection while\n // keeping prev elements selected\n this.setState(prevState => {\n const newSelectedElementIds = Object.assign({}, prevState.selectedElementIds);\n delete newSelectedElementIds[hitElement.id];\n const newSelectedElements = (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getSelectedElements)(this.scene.getNonDeletedElements(), {\n selectedElementIds: newSelectedElementIds\n });\n return Object.assign(Object.assign({}, (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: prevState.editingGroupId,\n selectedElementIds: newSelectedElementIds\n }, this.scene.getNonDeletedElements(), prevState, this)), {\n // set selectedLinearElement only if thats the only element selected\n selectedLinearElement: newSelectedElements.length === 1 && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(newSelectedElements[0]) ? new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(newSelectedElements[0], this.scene) : prevState.selectedLinearElement\n });\n });\n }\n } else if (hitElement.frameId && this.state.selectedElementIds[hitElement.frameId]) {\n // when hitElement is part of a selected frame, deselect the frame\n // to avoid frame and containing elements selected simultaneously\n this.setState(prevState => {\n var _a, _b;\n\n const nextSelectedElementIds = Object.assign(Object.assign({}, prevState.selectedElementIds), {\n [hitElement.id]: true\n }); // deselect the frame\n\n delete nextSelectedElementIds[hitElement.frameId]; // deselect groups containing the frame\n\n ((_b = (_a = this.scene.getElement(hitElement.frameId)) === null || _a === void 0 ? void 0 : _a.groupIds) !== null && _b !== void 0 ? _b : []).flatMap(gid => (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getElementsInGroup)(this.scene.getNonDeletedElements(), gid)).forEach(element => {\n delete nextSelectedElementIds[element.id];\n });\n return Object.assign(Object.assign({}, (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: prevState.editingGroupId,\n selectedElementIds: nextSelectedElementIds\n }, this.scene.getNonDeletedElements(), prevState, this)), {\n showHyperlinkPopup: hitElement.link || (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement) ? \"info\" : false\n });\n });\n } else {\n // add element to selection while keeping prev elements selected\n this.setState(_prevState => ({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.assign(Object.assign({}, _prevState.selectedElementIds), {\n [hitElement.id]: true\n }), _prevState)\n }));\n }\n } else {\n this.setState(prevState => {\n var _a;\n\n return Object.assign(Object.assign({}, (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: prevState.editingGroupId,\n selectedElementIds: {\n [hitElement.id]: true\n }\n }, this.scene.getNonDeletedElements(), prevState, this)), {\n selectedLinearElement: (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(hitElement) && // Don't set `selectedLinearElement` if its same as the hitElement, this is mainly to prevent resetting the `hoverPointIndex` to -1.\n // Future we should update the API to take care of setting the correct `hoverPointIndex` when initialized\n ((_a = prevState.selectedLinearElement) === null || _a === void 0 ? void 0 : _a.elementId) !== hitElement.id ? new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(hitElement, this.scene) : prevState.selectedLinearElement\n });\n });\n }\n }\n\n if (!pointerDownState.drag.hasOccurred && !this.state.isResizing && (hitElement && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isHittingElementBoundingBoxWithoutHittingElement)(hitElement, this.state, this.frameNameBoundsCache, pointerDownState.origin.x, pointerDownState.origin.y) || !hitElement && pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements)) {\n if (this.state.editingLinearElement) {\n this.setState({\n editingLinearElement: null\n });\n } else {\n // Deselect selected elements\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n selectedGroupIds: {},\n editingGroupId: null,\n activeEmbeddable: null\n });\n }\n\n return;\n }\n\n if (!activeTool.locked && activeTool.type !== \"freedraw\" && draggingElement && draggingElement.type !== \"selection\") {\n this.setState(prevState => ({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.assign(Object.assign({}, prevState.selectedElementIds), {\n [draggingElement.id]: true\n }), prevState),\n showHyperlinkPopup: (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(draggingElement) && !draggingElement.link ? \"editor\" : prevState.showHyperlinkPopup\n }));\n }\n\n if (activeTool.type !== \"selection\" || (0,_scene__WEBPACK_IMPORTED_MODULE_29__.isSomeElementSelected)(this.scene.getNonDeletedElements(), this.state)) {\n this.history.resumeRecording();\n }\n\n if (pointerDownState.drag.hasOccurred || isResizing || isRotating) {\n ((0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.isBindingEnabled)(this.state) ? _element_binding__WEBPACK_IMPORTED_MODULE_17__.bindOrUnbindSelectedElements : _element_binding__WEBPACK_IMPORTED_MODULE_17__.unbindLinearElements)(this.scene.getSelectedElements(this.state));\n }\n\n if (!activeTool.locked && activeTool.type !== \"freedraw\") {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n this.setState({\n draggingElement: null,\n suggestedBindings: [],\n activeTool: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, {\n type: \"selection\"\n })\n });\n } else {\n this.setState({\n draggingElement: null,\n suggestedBindings: []\n });\n }\n\n if (hitElement && this.lastPointerUp && this.lastPointerDown && this.lastPointerUp.timeStamp - this.lastPointerDown.timeStamp < 300 && gesture.pointers.size <= 1 && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement) && this.isEmbeddableCenter(hitElement, this.lastPointerUp, pointerDownState.origin.x, pointerDownState.origin.y)) {\n this.handleEmbeddableCenterClick(hitElement);\n }\n });\n }\n\n maybeSuggestBindingForAll(selectedElements) {\n if (selectedElements.length > 50) {\n return;\n }\n\n const suggestedBindings = (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.getEligibleElementsForBinding)(selectedElements);\n this.setState({\n suggestedBindings\n });\n }\n\n setSelection(elements) {\n const selectedElementIds = {};\n const selectedGroupIds = {};\n elements.forEach(ele => {\n if (ele.groupIds.length) {\n selectedElementIds[ele.id] = true;\n ele.groupIds.forEach(id => {\n selectedGroupIds[id] = true;\n });\n } // exclude bound text elements as we don't mark them as selected when\n // container is selected unless in group\n else if (!(0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBoundToContainer)(ele)) {\n selectedElementIds[ele.id] = true;\n }\n });\n this.setState({\n previousSelectedElementIds: this.state.selectedElementIds,\n selectedElementIds,\n selectedGroupIds\n });\n }\n\n clearSelection(hitElement) {\n this.setState(prevState => ({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, prevState),\n activeEmbeddable: null,\n selectedGroupIds: {},\n // Continue editing the same group if the user selected a different\n // element from it\n editingGroupId: prevState.editingGroupId && hitElement != null && (0,_groups__WEBPACK_IMPORTED_MODULE_23__.isElementInGroup)(hitElement, prevState.editingGroupId) ? prevState.editingGroupId : null\n }));\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n activeEmbeddable: null,\n previousSelectedElementIds: this.state.selectedElementIds\n });\n }\n\n getTextWysiwygSnappedToCenterPosition(x, y, appState, container) {\n if (container) {\n let elementCenterX = container.x + container.width / 2;\n let elementCenterY = container.y + container.height / 2;\n const elementCenter = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getContainerCenter)(container, appState);\n\n if (elementCenter) {\n elementCenterX = elementCenter.x;\n elementCenterY = elementCenter.y;\n }\n\n const distanceToCenter = Math.hypot(x - elementCenterX, y - elementCenterY);\n const isSnappedToCenter = distanceToCenter < _constants__WEBPACK_IMPORTED_MODULE_12__.TEXT_TO_CENTER_SNAP_THRESHOLD;\n\n if (isSnappedToCenter) {\n const {\n x: viewportX,\n y: viewportY\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.sceneCoordsToViewportCoords)({\n sceneX: elementCenterX,\n sceneY: elementCenterY\n }, appState);\n return {\n viewportX,\n viewportY,\n elementCenterX,\n elementCenterY\n };\n }\n }\n }\n\n getCanvasOffsets() {\n var _a;\n\n if ((_a = this.excalidrawContainerRef) === null || _a === void 0 ? void 0 : _a.current) {\n const excalidrawContainer = this.excalidrawContainerRef.current;\n const {\n left,\n top\n } = excalidrawContainer.getBoundingClientRect();\n return {\n offsetLeft: left,\n offsetTop: top\n };\n }\n\n return {\n offsetLeft: 0,\n offsetTop: 0\n };\n }\n\n async updateLanguage() {\n const currentLang = _i18n__WEBPACK_IMPORTED_MODULE_25__.languages.find(lang => lang.code === this.props.langCode) || _i18n__WEBPACK_IMPORTED_MODULE_25__.defaultLang;\n await (0,_i18n__WEBPACK_IMPORTED_MODULE_25__.setLanguage)(currentLang);\n this.setAppState({});\n }\n\n}\n\nApp.defaultProps = {\n // needed for tests to pass since we directly render App in many tests\n UIOptions: _constants__WEBPACK_IMPORTED_MODULE_12__.DEFAULT_UI_OPTIONS\n};\n\nif (\"development\" === _constants__WEBPACK_IMPORTED_MODULE_12__.ENV.TEST || \"development\" !== \"production\") {\n window.h = window.h || {};\n Object.defineProperties(window.h, {\n elements: {\n configurable: true,\n\n get() {\n var _a;\n\n return (_a = this.app) === null || _a === void 0 ? void 0 : _a.scene.getElementsIncludingDeleted();\n },\n\n set(elements) {\n var _a;\n\n return (_a = this.app) === null || _a === void 0 ? void 0 : _a.scene.replaceAllElements(elements);\n }\n\n }\n });\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (App);\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/App.tsx?");
2284
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExcalidrawContainerContext\": () => (/* binding */ ExcalidrawContainerContext),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ \"showFourthFont\": () => (/* binding */ showFourthFont),\n/* harmony export */ \"useApp\": () => (/* binding */ useApp),\n/* harmony export */ \"useAppProps\": () => (/* binding */ useAppProps),\n/* harmony export */ \"useDevice\": () => (/* binding */ useDevice),\n/* harmony export */ \"useExcalidrawActionManager\": () => (/* binding */ useExcalidrawActionManager),\n/* harmony export */ \"useExcalidrawAppState\": () => (/* binding */ useExcalidrawAppState),\n/* harmony export */ \"useExcalidrawContainer\": () => (/* binding */ useExcalidrawContainer),\n/* harmony export */ \"useExcalidrawElements\": () => (/* binding */ useExcalidrawElements),\n/* harmony export */ \"useExcalidrawSetAppState\": () => (/* binding */ useExcalidrawSetAppState)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var roughjs_bin_rough__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! roughjs/bin/rough */ \"../../../node_modules/roughjs/bin/rough.js\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"../../../node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var nanoid__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! nanoid */ \"../../../node_modules/nanoid/index.browser.js\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../actions */ \"../../actions/index.ts\");\n/* harmony import */ var _actions_actionHistory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../actions/actionHistory */ \"../../actions/actionHistory.tsx\");\n/* harmony import */ var _actions_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../actions/manager */ \"../../actions/manager.tsx\");\n/* harmony import */ var _actions_register__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../actions/register */ \"../../actions/register.ts\");\n/* harmony import */ var _analytics__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../analytics */ \"../../analytics.ts\");\n/* harmony import */ var _appState__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../appState */ \"../../appState.ts\");\n/* harmony import */ var _clipboard__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../clipboard */ \"../../clipboard.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\n/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../data */ \"../../data/index.ts\");\n/* harmony import */ var _data_library__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../data/library */ \"../../data/library.ts\");\n/* harmony import */ var _data_restore__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../data/restore */ \"../../data/restore.ts\");\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _element_binding__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../element/binding */ \"../../element/binding.ts\");\n/* harmony import */ var _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../element/linearElementEditor */ \"../../element/linearElementEditor.ts\");\n/* harmony import */ var _element_mutateElement__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../element/mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _element_newElement__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../element/newElement */ \"../../element/newElement.ts\");\n/* harmony import */ var _element_typeChecks__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../element/typeChecks */ \"../../element/typeChecks.ts\");\n/* harmony import */ var _gesture__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../gesture */ \"../../gesture.ts\");\n/* harmony import */ var _groups__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../groups */ \"../../groups.ts\");\n/* harmony import */ var _history__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../history */ \"../../history.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../keys */ \"../../keys.ts\");\n/* harmony import */ var _element_sizeHelpers__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../element/sizeHelpers */ \"../../element/sizeHelpers.ts\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../math */ \"../../math.ts\");\n/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../scene */ \"../../scene/index.ts\");\n/* harmony import */ var _scene_Scene__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../scene/Scene */ \"../../scene/Scene.ts\");\n/* harmony import */ var _scene_zoom__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../scene/zoom */ \"../../scene/zoom.ts\");\n/* harmony import */ var _shapes__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../shapes */ \"../../shapes.tsx\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _element_embeddable__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../element/embeddable */ \"../../element/embeddable.ts\");\n/* harmony import */ var _ContextMenu__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./ContextMenu */ \"../../components/ContextMenu.tsx\");\n/* harmony import */ var _LayerUI__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./LayerUI */ \"../../components/LayerUI.tsx\");\n/* harmony import */ var _Toast__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Toast */ \"../../components/Toast.tsx\");\n/* harmony import */ var _actions_actionToggleViewMode__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../actions/actionToggleViewMode */ \"../../actions/actionToggleViewMode.tsx\");\n/* harmony import */ var _data_blob__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../data/blob */ \"../../data/blob.ts\");\n/* harmony import */ var _element_image__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../element/image */ \"../../element/image.ts\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! lodash.throttle */ \"../../../node_modules/lodash.throttle/index.js\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_41__);\n/* harmony import */ var _data_filesystem__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../data/filesystem */ \"../../data/filesystem.ts\");\n/* harmony import */ var _element_textElement__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../element/textElement */ \"../../element/textElement.ts\");\n/* harmony import */ var _element_collision__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../element/collision */ \"../../element/collision.ts\");\n/* harmony import */ var _element_resizeElements__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../element/resizeElements */ \"../../element/resizeElements.ts\");\n/* harmony import */ var _element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../element/Hyperlink */ \"../../element/Hyperlink.tsx\");\n/* harmony import */ var _data_url__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../data/url */ \"../../data/url.ts\");\n/* harmony import */ var _element_transformHandles__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../element/transformHandles */ \"../../element/transformHandles.ts\");\n/* harmony import */ var _actions_actionElementLock__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../actions/actionElementLock */ \"../../actions/actionElementLock.ts\");\n/* harmony import */ var _scene_Fonts__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../scene/Fonts */ \"../../scene/Fonts.ts\");\n/* harmony import */ var _frame__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../frame */ \"../../frame.ts\");\n/* harmony import */ var _scene_selection__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ../scene/selection */ \"../../scene/selection.ts\");\n/* harmony import */ var _actions_actionClipboard__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ../actions/actionClipboard */ \"../../actions/actionClipboard.tsx\");\n/* harmony import */ var _actions_actionFrame__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ../actions/actionFrame */ \"../../actions/actionFrame.ts\");\n/* harmony import */ var _actions_actionCanvas__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../actions/actionCanvas */ \"../../actions/actionCanvas.tsx\");\n/* harmony import */ var _jotai__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../jotai */ \"../../jotai.ts\");\n/* harmony import */ var _ActiveConfirmDialog__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./ActiveConfirmDialog */ \"../../components/ActiveConfirmDialog.tsx\");\n/* harmony import */ var _snapping__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../snapping */ \"../../snapping.ts\");\n/* harmony import */ var _actions_actionBoundText__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../actions/actionBoundText */ \"../../actions/actionBoundText.tsx\");\n/* harmony import */ var _BraveMeasureTextError__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./BraveMeasureTextError */ \"../../components/BraveMeasureTextError.tsx\");\n/* harmony import */ var _EyeDropper__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./EyeDropper */ \"../../components/EyeDropper.tsx\");\n/* harmony import */ var _data_transform__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ../data/transform */ \"../../data/transform.ts\");\n/* harmony import */ var _Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./Sidebar/Sidebar */ \"../../components/Sidebar/Sidebar.tsx\");\n/* harmony import */ var _canvases__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./canvases */ \"../../components/canvases/index.tsx\");\n/* harmony import */ var _scene_Renderer__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ../scene/Renderer */ \"../../scene/Renderer.ts\");\n/* harmony import */ var _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ../scene/ShapeCache */ \"../../scene/ShapeCache.ts\");\n/* harmony import */ var _MermaidToExcalidraw__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./MermaidToExcalidraw */ \"../../components/MermaidToExcalidraw.tsx\");\n/* harmony import */ var _LaserTool_LaserTool__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./LaserTool/LaserTool */ \"../../components/LaserTool/LaserTool.tsx\");\n/* harmony import */ var _LaserTool_LaserPathManager__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./LaserTool/LaserPathManager */ \"../../components/LaserTool/LaserPathManager.ts\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst AppContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext(null);\nconst AppPropsContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext(null);\nlet showFourthFont = false; //zsviczian\n\nconst deviceContextInitialValue = {\n isSmScreen: false,\n isMobile: false,\n isTouchScreen: false,\n canDeviceFitSidebar: false,\n isLandscape: false\n};\nconst DeviceContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext(deviceContextInitialValue);\nDeviceContext.displayName = \"DeviceContext\";\nconst ExcalidrawContainerContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext({\n container: null,\n id: null\n});\nExcalidrawContainerContext.displayName = \"ExcalidrawContainerContext\";\nconst ExcalidrawElementsContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext([]);\nExcalidrawElementsContext.displayName = \"ExcalidrawElementsContext\";\nconst ExcalidrawAppStateContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext(Object.assign(Object.assign({}, (0,_appState__WEBPACK_IMPORTED_MODULE_10__.getDefaultAppState)()), {\n width: 0,\n height: 0,\n offsetLeft: 0,\n offsetTop: 0\n}));\nExcalidrawAppStateContext.displayName = \"ExcalidrawAppStateContext\";\nconst ExcalidrawSetAppStateContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext(() => {\n console.warn(\"unitialized ExcalidrawSetAppStateContext context!\");\n});\nExcalidrawSetAppStateContext.displayName = \"ExcalidrawSetAppStateContext\";\nconst ExcalidrawActionManagerContext = react__WEBPACK_IMPORTED_MODULE_1___default().createContext(null);\nExcalidrawActionManagerContext.displayName = \"ExcalidrawActionManagerContext\";\nconst useApp = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(AppContext);\nconst useAppProps = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(AppPropsContext);\nconst useDevice = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(DeviceContext);\nconst useExcalidrawContainer = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(ExcalidrawContainerContext);\nconst useExcalidrawElements = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(ExcalidrawElementsContext);\nconst useExcalidrawAppState = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(ExcalidrawAppStateContext);\nconst useExcalidrawSetAppState = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(ExcalidrawSetAppStateContext);\nconst useExcalidrawActionManager = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(ExcalidrawActionManagerContext);\nlet didTapTwice = false;\nlet tappedTwiceTimer = 0;\nlet isHoldingSpace = false;\nlet isPanning = false;\nlet isDraggingScrollBar = false;\nlet currentScrollBars = {\n horizontal: null,\n vertical: null\n};\nlet touchTimeout = 0;\nlet invalidateContextMenu = false;\n/**\r\n * Map of youtube embed video states\r\n */\n\nconst YOUTUBE_VIDEO_STATES = new Map();\nlet IS_PLAIN_PASTE = false;\nlet IS_PLAIN_PASTE_TIMER = 0;\nlet PLAIN_PASTE_TOAST_SHOWN = false;\nlet lastPointerUp = null;\nconst gesture = {\n pointers: new Map(),\n lastCenter: null,\n initialDistance: null,\n initialScale: null\n};\n\nclass App extends (react__WEBPACK_IMPORTED_MODULE_1___default().Component) {\n constructor(props) {\n var _a;\n\n super(props);\n this.interactiveCanvas = null;\n this.unmounted = false;\n this.device = deviceContextInitialValue;\n this.excalidrawContainerRef = react__WEBPACK_IMPORTED_MODULE_1___default().createRef();\n this.files = {};\n this.imageCache = new Map();\n this.iFrameRefs = new Map();\n this.lastPointerDownEvent = null;\n this.lastPointerUpEvent = null;\n this.lastViewportPosition = {\n x: 0,\n y: 0\n };\n this.allowMobileMode = true; //zsviczian\n\n this.laserPathManager = new _LaserTool_LaserPathManager__WEBPACK_IMPORTED_MODULE_69__.LaserPathManager(this);\n\n this.updateEmbeddables = () => {\n const embeddableElements = new Map();\n let updated = false;\n this.scene.getNonDeletedElements().filter(element => {\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(element)) {\n embeddableElements.set(element.id, true);\n\n if (element.validated == null) {\n updated = true;\n const validated = (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.embeddableURLValidator)(element.link, this.props.validateEmbeddable);\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n validated\n }, false);\n _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_66__.ShapeCache[\"delete\"](element);\n }\n }\n\n return false;\n });\n\n if (updated) {\n this.scene.informMutation();\n } // GC\n\n\n this.iFrameRefs.forEach((ref, id) => {\n if (!embeddableElements.has(id)) {\n this.iFrameRefs.delete(id);\n }\n });\n };\n\n this.getFrameNameDOMId = frameElement => {\n return `${this.id}-frame-name-${frameElement.id}`;\n };\n\n this.frameNameBoundsCache = {\n get: frameElement => {\n let bounds = this.frameNameBoundsCache._cache.get(frameElement.id);\n\n if (!bounds || bounds.zoom !== this.state.zoom.value || bounds.versionNonce !== frameElement.versionNonce) {\n const frameNameDiv = document.getElementById(this.getFrameNameDOMId(frameElement));\n\n if (frameNameDiv) {\n const box = frameNameDiv.getBoundingClientRect();\n const boxSceneTopLeft = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: box.x,\n clientY: box.y\n }, this.state);\n const boxSceneBottomRight = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: box.right,\n clientY: box.bottom\n }, this.state);\n bounds = {\n x: boxSceneTopLeft.x,\n y: boxSceneTopLeft.y,\n width: boxSceneBottomRight.x - boxSceneTopLeft.x,\n height: boxSceneBottomRight.y - boxSceneTopLeft.y,\n angle: 0,\n zoom: this.state.zoom.value,\n versionNonce: frameElement.versionNonce\n };\n\n this.frameNameBoundsCache._cache.set(frameElement.id, bounds);\n\n return bounds;\n }\n\n return null;\n }\n\n return bounds;\n },\n\n /**\r\n * @private\r\n */\n _cache: new Map()\n };\n\n this.renderFrameNames = () => {\n if (!this.state.frameRendering.enabled || !this.state.frameRendering.name) {\n return null;\n }\n\n const isDarkTheme = this.state.theme === \"dark\";\n return this.scene.getNonDeletedFrames().map((f, index) => {\n if (!(0,_element_sizeHelpers__WEBPACK_IMPORTED_MODULE_27__.isElementInViewport)(f, this.canvas.width / window.devicePixelRatio, this.canvas.height / window.devicePixelRatio, {\n offsetLeft: this.state.offsetLeft,\n offsetTop: this.state.offsetTop,\n scrollX: this.state.scrollX,\n scrollY: this.state.scrollY,\n zoom: this.state.zoom\n })) {\n // if frame not visible, don't render its name\n return null;\n }\n\n const {\n x: x1,\n y: y1\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.sceneCoordsToViewportCoords)({\n sceneX: f.x,\n sceneY: f.y\n }, this.state);\n const {\n x: x2\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.sceneCoordsToViewportCoords)({\n sceneX: f.x + f.width,\n sceneY: f.y + f.height\n }, this.state);\n const FRAME_NAME_GAP = 20;\n const FRAME_NAME_EDIT_PADDING = 6;\n\n const reset = () => {\n var _a;\n\n if (((_a = f.name) === null || _a === void 0 ? void 0 : _a.trim()) === \"\") {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(f, {\n name: null\n });\n }\n\n this.setState({\n editingFrame: null\n });\n };\n\n let frameNameJSX;\n\n if (f.id === this.state.editingFrame) {\n const frameNameInEdit = f.name == null ? `Frame ${(index + 1).toString().padStart(2, \"0\")}` //zsviczian\n : f.name;\n frameNameJSX = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"input\", {\n autoFocus: true,\n value: frameNameInEdit,\n onChange: e => {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(f, {\n name: e.target.value\n });\n },\n onBlur: () => reset(),\n onKeyDown: event => {\n // for some inexplicable reason, `onBlur` triggered on ESC\n // does not reset `state.editingFrame` despite being called,\n // and we need to reset it here as well\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ESCAPE || event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ENTER) {\n reset();\n }\n },\n style: {\n background: this.state.viewBackgroundColor,\n filter: isDarkTheme ? _constants__WEBPACK_IMPORTED_MODULE_12__.THEME_FILTER : \"none\",\n zIndex: 2,\n border: \"none\",\n display: \"block\",\n padding: `${FRAME_NAME_EDIT_PADDING}px`,\n borderRadius: 4,\n boxShadow: \"inset 0 0 0 1px var(--color-primary)\",\n fontFamily: \"Assistant\",\n fontSize: \"14px\",\n transform: `translateY(-${FRAME_NAME_EDIT_PADDING}px)`,\n color: \"var(--color-gray-80)\",\n overflow: \"hidden\",\n maxWidth: `${Math.min(x2 - x1 - FRAME_NAME_EDIT_PADDING, document.body.clientWidth - x1 - FRAME_NAME_EDIT_PADDING)}px`\n },\n size: frameNameInEdit.length + 1 || 1,\n dir: \"auto\",\n autoComplete: \"off\",\n autoCapitalize: \"off\",\n autoCorrect: \"off\"\n });\n } else {\n frameNameJSX = f.name == null || f.name.trim() === \"\" ? `Frame ${(index + 1).toString().padStart(2, \"0\")}` //zsviczian\n : f.name.trim();\n }\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n id: this.getFrameNameDOMId(f),\n style: {\n position: \"absolute\",\n top: `${y1 - FRAME_NAME_GAP - this.state.offsetTop}px`,\n left: `${x1 - this.state.offsetLeft - (this.state.editingFrame === f.id ? FRAME_NAME_EDIT_PADDING : 0)}px`,\n zIndex: 2,\n fontSize: \"14px\",\n color: isDarkTheme ? \"var(--color-gray-60)\" : \"var(--color-gray-50)\",\n width: \"max-content\",\n maxWidth: `${x2 - x1 + FRAME_NAME_EDIT_PADDING * 2}px`,\n overflow: f.id === this.state.editingFrame ? \"visible\" : \"hidden\",\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n cursor: _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.MOVE,\n pointerEvents: this.state.viewModeEnabled ? _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_EVENTS.disabled : _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_EVENTS.enabled\n },\n onPointerDown: event => this.handleCanvasPointerDown(event),\n onWheel: event => this.handleWheel(event),\n onContextMenu: this.handleCanvasContextMenu,\n onDoubleClick: () => {\n this.setState({\n editingFrame: f.id\n });\n }\n }, {\n children: frameNameJSX\n }), f.id);\n });\n };\n\n this.focusContainer = () => {\n var _a;\n\n (_a = this.excalidrawContainerRef.current) === null || _a === void 0 ? void 0 : _a.focus();\n };\n\n this.getSceneElementsIncludingDeleted = () => {\n return this.scene.getElementsIncludingDeleted();\n };\n\n this.getSceneElements = () => {\n return this.scene.getNonDeletedElements();\n };\n\n this.onInsertElements = elements => {\n this.addElementsFromPasteOrLibrary({\n elements,\n position: \"center\",\n files: null\n });\n };\n\n this.onExportImage = async (type, elements) => {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_9__.trackEvent)(\"export\", type, \"ui\");\n const fileHandle = await (0,_data__WEBPACK_IMPORTED_MODULE_13__.exportCanvas)(type, elements, this.state, this.files, {\n exportBackground: this.state.exportBackground,\n name: this.state.name,\n viewBackgroundColor: this.state.viewBackgroundColor\n }).catch(_utils__WEBPACK_IMPORTED_MODULE_33__.muteFSAbortError).catch(error => {\n console.error(error);\n this.setState({\n errorMessage: error.message\n });\n });\n\n if (this.state.exportEmbedScene && fileHandle && (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.isImageFileHandle)(fileHandle)) {\n this.setState({\n fileHandle\n });\n }\n };\n\n this.openEyeDropper = ({\n type\n }) => {\n _jotai__WEBPACK_IMPORTED_MODULE_56__.jotaiStore.set(_EyeDropper__WEBPACK_IMPORTED_MODULE_61__.activeEyeDropperAtom, {\n swapPreviewOnAlt: true,\n colorPickerType: type === \"stroke\" ? \"elementStroke\" : \"elementBackground\",\n onSelect: (color, event) => {\n const shouldUpdateStrokeColor = type === \"background\" && event.altKey || type === \"stroke\" && !event.altKey;\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (!selectedElements.length || this.state.activeTool.type !== \"selection\") {\n if (shouldUpdateStrokeColor) {\n this.syncActionResult({\n appState: Object.assign(Object.assign({}, this.state), {\n currentItemStrokeColor: color\n }),\n commitToHistory: true\n });\n } else {\n this.syncActionResult({\n appState: Object.assign(Object.assign({}, this.state), {\n currentItemBackgroundColor: color\n }),\n commitToHistory: true\n });\n }\n } else {\n this.updateScene({\n elements: this.scene.getElementsIncludingDeleted().map(el => {\n if (this.state.selectedElementIds[el.id]) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(el, {\n [shouldUpdateStrokeColor ? \"strokeColor\" : \"backgroundColor\"]: color\n });\n }\n\n return el;\n })\n });\n }\n },\n keepOpenOnAlt: false\n });\n };\n\n this.syncActionResult = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(actionResult => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n\n if (this.unmounted || actionResult === false) {\n return;\n }\n\n let editingElement = null;\n\n if (actionResult.elements) {\n actionResult.elements.forEach(element => {\n var _a;\n\n if (((_a = this.state.editingElement) === null || _a === void 0 ? void 0 : _a.id) === element.id && this.state.editingElement !== element && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isNonDeletedElement)(element)) {\n editingElement = element;\n }\n });\n this.scene.replaceAllElements(actionResult.elements);\n\n if (actionResult.commitToHistory) {\n this.history.resumeRecording();\n }\n }\n\n if (actionResult.files) {\n this.files = actionResult.replaceFiles ? actionResult.files : Object.assign(Object.assign({}, this.files), actionResult.files);\n this.addNewImagesToImageCache();\n }\n\n if (actionResult.appState || editingElement || this.state.contextMenu) {\n if (actionResult.commitToHistory) {\n this.history.resumeRecording();\n }\n\n let viewModeEnabled = ((_a = actionResult === null || actionResult === void 0 ? void 0 : actionResult.appState) === null || _a === void 0 ? void 0 : _a.viewModeEnabled) || false;\n let zenModeEnabled = ((_b = actionResult === null || actionResult === void 0 ? void 0 : actionResult.appState) === null || _b === void 0 ? void 0 : _b.zenModeEnabled) || false;\n let gridSize = ((_c = actionResult === null || actionResult === void 0 ? void 0 : actionResult.appState) === null || _c === void 0 ? void 0 : _c.gridSize) || null;\n const theme = ((_d = actionResult === null || actionResult === void 0 ? void 0 : actionResult.appState) === null || _d === void 0 ? void 0 : _d.theme) || this.props.theme || _constants__WEBPACK_IMPORTED_MODULE_12__.THEME.LIGHT;\n let name = (_f = (_e = actionResult === null || actionResult === void 0 ? void 0 : actionResult.appState) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : this.state.name;\n const errorMessage = (_h = (_g = actionResult === null || actionResult === void 0 ? void 0 : actionResult.appState) === null || _g === void 0 ? void 0 : _g.errorMessage) !== null && _h !== void 0 ? _h : this.state.errorMessage;\n\n if (typeof this.props.viewModeEnabled !== \"undefined\") {\n viewModeEnabled = this.props.viewModeEnabled;\n }\n\n if (typeof this.props.zenModeEnabled !== \"undefined\") {\n zenModeEnabled = this.props.zenModeEnabled;\n }\n\n if (typeof this.props.gridModeEnabled !== \"undefined\") {\n gridSize = this.props.gridModeEnabled ? _constants__WEBPACK_IMPORTED_MODULE_12__.GRID_SIZE : null;\n }\n\n if (typeof this.props.name !== \"undefined\") {\n name = this.props.name;\n }\n\n editingElement = editingElement || ((_j = actionResult.appState) === null || _j === void 0 ? void 0 : _j.editingElement) || null;\n\n if (editingElement === null || editingElement === void 0 ? void 0 : editingElement.isDeleted) {\n editingElement = null;\n }\n\n this.setState(state => {\n // using Object.assign instead of spread to fool TS 4.2.2+ into\n // regarding the resulting type as not containing undefined\n // (which the following expression will never contain)\n return Object.assign(actionResult.appState || {}, {\n // NOTE this will prevent opening context menu using an action\n // or programmatically from the host, so it will need to be\n // rewritten later\n contextMenu: null,\n editingElement,\n viewModeEnabled,\n zenModeEnabled,\n gridSize,\n theme,\n name,\n errorMessage\n });\n }, () => {\n if (actionResult.syncHistory) {\n this.history.setCurrentState(this.state, this.scene.getElementsIncludingDeleted());\n }\n });\n }\n }); // Lifecycle\n\n this.onBlur = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(() => {\n isHoldingSpace = false;\n this.setState({\n isBindingEnabled: true\n });\n });\n\n this.onUnload = () => {\n this.onBlur();\n };\n\n this.disableEvent = event => {\n event.preventDefault();\n };\n\n this.resetHistory = () => {\n this.history.clear();\n };\n /**\r\n * Resets scene & history.\r\n * ! Do not use to clear scene user action !\r\n */\n\n\n this.resetScene = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(opts => {\n this.scene.replaceAllElements([]);\n this.setState(state => Object.assign(Object.assign({}, (0,_appState__WEBPACK_IMPORTED_MODULE_10__.getDefaultAppState)()), {\n isLoading: (opts === null || opts === void 0 ? void 0 : opts.resetLoadingState) ? false : state.isLoading,\n theme: this.state.theme\n }));\n this.resetHistory();\n });\n\n this.initializeScene = async () => {\n var _a;\n\n if (\"launchQueue\" in window && \"LaunchParams\" in window) {\n window.launchQueue.setConsumer(async launchParams => {\n if (!launchParams.files.length) {\n return;\n }\n\n const fileHandle = launchParams.files[0];\n const blob = await fileHandle.getFile();\n this.loadFileToCanvas(new File([blob], blob.name || \"\", {\n type: blob.type\n }), fileHandle);\n });\n }\n\n if (this.props.theme) {\n this.setState({\n theme: this.props.theme\n });\n }\n\n if (!this.state.isLoading) {\n this.setState({\n isLoading: true\n });\n }\n\n let initialData = null;\n\n try {\n initialData = (await this.props.initialData) || null;\n\n if (initialData === null || initialData === void 0 ? void 0 : initialData.libraryItems) {\n this.library.updateLibrary({\n libraryItems: initialData.libraryItems,\n merge: true\n }).catch(error => {\n console.error(error);\n });\n }\n } catch (error) {\n console.error(error);\n initialData = {\n appState: {\n errorMessage: error.message || \"Encountered an error during importing or restoring scene data\"\n }\n };\n }\n\n const scene = (0,_data_restore__WEBPACK_IMPORTED_MODULE_15__.restore)(initialData, null, null, {\n repairBindings: true\n });\n scene.appState = Object.assign(Object.assign({}, scene.appState), {\n theme: this.props.theme || scene.appState.theme,\n // we're falling back to current (pre-init) state when deciding\n // whether to open the library, to handle a case where we\n // update the state outside of initialData (e.g. when loading the app\n // with a library install link, which should auto-open the library)\n openSidebar: ((_a = scene.appState) === null || _a === void 0 ? void 0 : _a.openSidebar) || this.state.openSidebar,\n activeTool: scene.appState.activeTool.type === \"image\" ? Object.assign(Object.assign({}, scene.appState.activeTool), {\n type: \"selection\"\n }) : scene.appState.activeTool,\n isLoading: false,\n toast: this.state.toast\n });\n\n if (initialData === null || initialData === void 0 ? void 0 : initialData.scrollToContent) {\n scene.appState = Object.assign(Object.assign({}, scene.appState), (0,_scene__WEBPACK_IMPORTED_MODULE_29__.calculateScrollCenter)(scene.elements, Object.assign(Object.assign({}, scene.appState), {\n width: this.state.width,\n height: this.state.height,\n offsetTop: this.state.offsetTop,\n offsetLeft: this.state.offsetLeft\n })));\n } // FontFaceSet loadingdone event we listen on may not always fire\n // (looking at you Safari), so on init we manually load fonts for current\n // text elements on canvas, and rerender them once done. This also\n // seems faster even in browsers that do fire the loadingdone event.\n\n\n this.fonts.loadFontsForElements(scene.elements);\n this.resetHistory();\n this.syncActionResult(Object.assign(Object.assign({}, scene), {\n commitToHistory: true\n }));\n };\n\n this.refreshDeviceState = container => {\n const {\n width,\n height\n } = container.getBoundingClientRect();\n const sidebarBreakpoint = this.props.UIOptions.dockedSidebarBreakpoint != null ? this.props.UIOptions.dockedSidebarBreakpoint : _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_RIGHT_SIDEBAR_MIN_WIDTH;\n this.device = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateObject)(this.device, {\n isLandscape: width > height,\n isSmScreen: width < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_SM_MAX_WIDTH,\n isMobile: this.allowMobileMode && ( //zsviczian\n width < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_WIDTH_PORTRAIT || height < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_HEIGHT_LANDSCAPE && width < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_WIDTH_LANDSCAPE),\n canDeviceFitSidebar: width > sidebarBreakpoint\n });\n };\n\n this.onResize = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(() => {\n this.scene.getElementsIncludingDeleted().forEach(element => _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_66__.ShapeCache[\"delete\"](element));\n this.setState({});\n });\n\n this.renderInteractiveSceneCallback = ({\n atLeastOneVisibleElement,\n scrollBars,\n elements\n }) => {\n if (!document.querySelector(\".excalidraw\")) {\n return;\n } //zsviczian - address issue when moving excalidraw to a new window/document\n\n\n if (scrollBars) {\n currentScrollBars = scrollBars;\n }\n\n const scrolledOutside = // hide when editing text\n (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(this.state.editingElement) ? false : !atLeastOneVisibleElement && elements.length > 0;\n\n if (this.state.scrolledOutside !== scrolledOutside) {\n this.setState({\n scrolledOutside\n });\n }\n\n this.scheduleImageRefresh();\n };\n\n this.onScroll = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.debounce)(() => {\n const {\n offsetTop,\n offsetLeft\n } = this.getCanvasOffsets();\n this.setState(state => {\n if (state.offsetLeft === offsetLeft && state.offsetTop === offsetTop) {\n return null;\n }\n\n return {\n offsetTop,\n offsetLeft\n };\n });\n }, _constants__WEBPACK_IMPORTED_MODULE_12__.SCROLL_TIMEOUT); // Copy/paste\n\n this.onCut = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n var _a;\n\n const isExcalidrawActive = (_a = this.excalidrawContainerRef.current) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement);\n\n if (!isExcalidrawActive || (0,_utils__WEBPACK_IMPORTED_MODULE_33__.isWritableElement)(event.target)) {\n return;\n }\n\n this.cutAll();\n event.preventDefault();\n event.stopPropagation();\n });\n this.onCopy = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n var _a;\n\n const isExcalidrawActive = (_a = this.excalidrawContainerRef.current) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement);\n\n if (!isExcalidrawActive || (0,_utils__WEBPACK_IMPORTED_MODULE_33__.isWritableElement)(event.target)) {\n return;\n }\n\n this.copyAll();\n event.preventDefault();\n event.stopPropagation();\n });\n\n this.cutAll = () => {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionCut, \"keyboard\");\n };\n\n this.copyAll = () => {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionCopy, \"keyboard\");\n };\n\n this.onTouchStart = event => {\n // fix for Apple Pencil Scribble\n // On Android, preventing the event would disable contextMenu on tap-hold\n if (!_constants__WEBPACK_IMPORTED_MODULE_12__.isAndroid) {\n event.preventDefault();\n }\n\n if (!didTapTwice) {\n didTapTwice = true;\n clearTimeout(tappedTwiceTimer);\n tappedTwiceTimer = window.setTimeout(App.resetTapTwice, _constants__WEBPACK_IMPORTED_MODULE_12__.TAP_TWICE_TIMEOUT);\n return;\n } // insert text only if we tapped twice with a single finger\n // event.touches.length === 1 will also prevent inserting text when user's zooming\n\n\n if (didTapTwice && event.touches.length === 1) {\n const touch = event.touches[0]; // @ts-ignore\n\n this.handleCanvasDoubleClick({\n clientX: touch.clientX,\n clientY: touch.clientY\n });\n didTapTwice = false;\n clearTimeout(tappedTwiceTimer);\n }\n\n if (_constants__WEBPACK_IMPORTED_MODULE_12__.isAndroid) {\n event.preventDefault();\n }\n\n if (event.touches.length === 2) {\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n activeEmbeddable: null\n });\n }\n };\n\n this.onTouchEnd = event => {\n this.resetContextMenuTimer();\n\n if (event.touches.length > 0) {\n this.setState({\n previousSelectedElementIds: {},\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(this.state.previousSelectedElementIds, this.state)\n });\n } else {\n gesture.pointers.clear();\n }\n };\n\n this.pasteFromClipboard = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(async event => {\n var _a, _b, _c;\n\n const isPlainPaste = !!(IS_PLAIN_PASTE && event); // #686\n\n const target = document.activeElement;\n const isExcalidrawActive = (_a = this.excalidrawContainerRef.current) === null || _a === void 0 ? void 0 : _a.contains(target);\n\n if (event && !isExcalidrawActive) {\n return;\n }\n\n const elementUnderCursor = document.elementFromPoint(this.lastViewportPosition.x, this.lastViewportPosition.y);\n\n if (event && (!(elementUnderCursor instanceof HTMLCanvasElement) || (0,_utils__WEBPACK_IMPORTED_MODULE_33__.isWritableElement)(target))) {\n return;\n } // must be called in the same frame (thus before any awaits) as the paste\n // event else some browsers (FF...) will clear the clipboardData\n // (something something security)\n\n\n let file = (_b = event === null || event === void 0 ? void 0 : event.clipboardData) === null || _b === void 0 ? void 0 : _b.files[0];\n const data = await (0,_clipboard__WEBPACK_IMPORTED_MODULE_11__.parseClipboard)(event, isPlainPaste);\n\n if (!file && data.text && !isPlainPaste) {\n const string = data.text.trim();\n\n if (string.startsWith(\"<svg\") && string.endsWith(\"</svg>\")) {\n // ignore SVG validation/normalization which will be done during image\n // initialization\n file = (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.SVGStringToFile)(string);\n }\n }\n\n const {\n x: sceneX,\n y: sceneY\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: this.lastViewportPosition.x,\n clientY: this.lastViewportPosition.y\n }, this.state); // prefer spreadsheet data over image file (MS Office/Libre Office)\n\n if ((0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.isSupportedImageFile)(file) && !data.spreadsheet) {\n const imageElement = this.createImageElement({\n sceneX,\n sceneY\n });\n this.insertImageElement(imageElement, file);\n this.initializeImageDimensions(imageElement);\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({\n [imageElement.id]: true\n }, this.state)\n });\n return;\n }\n\n if (this.props.onPaste) {\n try {\n if ((await this.props.onPaste(data, event)) === false) {\n return;\n }\n } catch (error) {\n console.error(error);\n }\n }\n\n if (data.errorMessage) {\n this.setState({\n errorMessage: data.errorMessage\n });\n } else if (data.spreadsheet && !isPlainPaste) {\n this.setState({\n pasteDialog: {\n data: data.spreadsheet,\n shown: true\n }\n });\n } else if (data.elements) {\n const elements = data.programmaticAPI ? (0,_data_transform__WEBPACK_IMPORTED_MODULE_62__.convertToExcalidrawElements)(data.elements) : data.elements; // TODO remove formatting from elements if isPlainPaste\n\n this.addElementsFromPasteOrLibrary({\n elements,\n files: data.files || null,\n position: \"cursor\",\n retainSeed: isPlainPaste\n });\n } else if (data.text) {\n const maybeUrl = (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.extractSrc)(data.text);\n\n if (!isPlainPaste && (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.embeddableURLValidator)(maybeUrl, this.props.validateEmbeddable) && (/^(http|https):\\/\\/[^\\s/$.?#].[^\\s]*$/.test(maybeUrl) || ((_c = (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.getEmbedLink)(maybeUrl)) === null || _c === void 0 ? void 0 : _c.type) === \"video\")) {\n const embeddable = this.insertEmbeddableElement({\n sceneX,\n sceneY,\n link: (0,_data_url__WEBPACK_IMPORTED_MODULE_47__.normalizeLink)(maybeUrl)\n });\n\n if (embeddable) {\n this.setState({\n selectedElementIds: {\n [embeddable.id]: true\n }\n });\n }\n\n return;\n }\n\n this.addTextFromPaste(data.text, isPlainPaste);\n }\n\n this.setActiveTool({\n type: \"selection\"\n });\n event === null || event === void 0 ? void 0 : event.preventDefault();\n });\n\n this.addElementsFromPasteOrLibrary = opts => {\n const elements = (0,_data_restore__WEBPACK_IMPORTED_MODULE_15__.restoreElements)(opts.elements, null, undefined);\n const [minX, minY, maxX, maxY] = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getCommonBounds)(elements);\n const elementsCenterX = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.distance)(minX, maxX) / 2;\n const elementsCenterY = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.distance)(minY, maxY) / 2;\n const clientX = typeof opts.position === \"object\" ? opts.position.clientX : opts.position === \"cursor\" ? this.lastViewportPosition.x : this.state.width / 2 + this.state.offsetLeft;\n const clientY = typeof opts.position === \"object\" ? opts.position.clientY : opts.position === \"cursor\" ? this.lastViewportPosition.y : this.state.height / 2 + this.state.offsetTop;\n const {\n x,\n y\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX,\n clientY\n }, this.state);\n const dx = x - elementsCenterX;\n const dy = y - elementsCenterY;\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(dx, dy, this.state.gridSize);\n const newElements = (0,_element_newElement__WEBPACK_IMPORTED_MODULE_20__.duplicateElements)(elements.map(element => {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(element, {\n x: element.x + gridX - minX,\n y: element.y + gridY - minY\n });\n }), {\n randomizeSeed: !opts.retainSeed\n });\n const nextElements = [...this.scene.getElementsIncludingDeleted(), ...newElements];\n this.scene.replaceAllElements(nextElements);\n newElements.forEach(newElement => {\n if ((0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(newElement) && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBoundToContainer)(newElement)) {\n const container = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getContainerElement)(newElement);\n (0,_element__WEBPACK_IMPORTED_MODULE_16__.redrawTextBoundingBox)(newElement, container);\n }\n });\n\n if (opts.files) {\n this.files = Object.assign(Object.assign({}, this.files), opts.files);\n }\n\n this.history.resumeRecording();\n const nextElementsToSelect = (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.excludeElementsInFramesFromSelection)(newElements);\n this.setState(Object.assign(Object.assign(Object.assign({}, this.state), {\n // keep sidebar (presumably the library) open if it's docked and\n // can fit.\n //\n // Note, we should close the sidebar only if we're dropping items\n // from library, not when pasting from clipboard. Alas.\n openSidebar: this.state.openSidebar && this.device.canDeviceFitSidebar && _jotai__WEBPACK_IMPORTED_MODULE_56__.jotaiStore.get(_Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_63__.isSidebarDockedAtom) ? this.state.openSidebar : null\n }), (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: null,\n selectedElementIds: nextElementsToSelect.reduce((acc, element) => {\n if (!(0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBoundToContainer)(element)) {\n acc[element.id] = true;\n }\n\n return acc;\n }, {})\n }, this.scene.getNonDeletedElements(), this.state, this)), () => {\n if (opts.files) {\n this.addNewImagesToImageCache();\n }\n });\n this.setActiveTool({\n type: \"selection\"\n });\n\n if (opts.fitToContent) {\n this.scrollToContent(newElements, {\n fitToContent: true\n });\n }\n };\n\n this.setAppState = (state, callback) => {\n this.setState(state, callback);\n };\n\n this.removePointer = event => {\n if (touchTimeout) {\n this.resetContextMenuTimer();\n }\n\n gesture.pointers.delete(event.pointerId);\n };\n\n this.toggleLock = (source = \"ui\") => {\n if (!this.state.activeTool.locked) {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_9__.trackEvent)(\"toolbar\", \"toggleLock\", `${source} (${this.device.isMobile ? \"mobile\" : \"desktop\"})`);\n }\n\n this.setState(prevState => {\n return {\n activeTool: Object.assign(Object.assign(Object.assign({}, prevState.activeTool), (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, prevState.activeTool.locked ? {\n type: \"selection\"\n } : prevState.activeTool)), {\n locked: !prevState.activeTool.locked\n })\n };\n });\n };\n\n this.updateFrameRendering = opts => {\n this.setState(prevState => {\n var _a, _b, _c, _d;\n\n const next = typeof opts === \"function\" ? opts(prevState.frameRendering) : opts;\n return {\n frameRendering: {\n enabled: (_a = next === null || next === void 0 ? void 0 : next.enabled) !== null && _a !== void 0 ? _a : prevState.frameRendering.enabled,\n clip: (_b = next === null || next === void 0 ? void 0 : next.clip) !== null && _b !== void 0 ? _b : prevState.frameRendering.clip,\n name: (_c = next === null || next === void 0 ? void 0 : next.name) !== null && _c !== void 0 ? _c : prevState.frameRendering.name,\n outline: (_d = next === null || next === void 0 ? void 0 : next.outline) !== null && _d !== void 0 ? _d : prevState.frameRendering.outline\n }\n };\n });\n };\n\n this.togglePenMode = force => {\n this.setState(prevState => {\n return {\n penMode: force !== null && force !== void 0 ? force : !prevState.penMode,\n penDetected: true\n };\n });\n };\n\n this.onHandToolToggle = () => {\n this.actionManager.executeAction(_actions_actionCanvas__WEBPACK_IMPORTED_MODULE_55__.actionToggleHandTool);\n };\n /**\r\n * Zooms on canvas viewport center\r\n */\n\n\n this.zoomCanvas = (\n /** decimal fraction between 0.1 (10% zoom) and 30 (3000% zoom) */\n value) => {\n this.setState(Object.assign({}, (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_31__.getStateForZoom)({\n viewportX: this.state.width / 2 + this.state.offsetLeft,\n viewportY: this.state.height / 2 + this.state.offsetTop,\n nextZoom: (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getNormalizedZoom)(value)\n }, this.state)));\n };\n\n this.cancelInProgresAnimation = null;\n\n this.scrollToContent = (target = this.scene.getNonDeletedElements(), opts) => {\n var _a, _b;\n\n (_a = this.cancelInProgresAnimation) === null || _a === void 0 ? void 0 : _a.call(this); // convert provided target into ExcalidrawElement[] if necessary\n\n const targetElements = Array.isArray(target) ? target : [target];\n let zoom = this.state.zoom;\n let scrollX = this.state.scrollX;\n let scrollY = this.state.scrollY;\n\n if ((opts === null || opts === void 0 ? void 0 : opts.fitToContent) || (opts === null || opts === void 0 ? void 0 : opts.fitToViewport)) {\n const {\n appState\n } = (0,_actions_actionCanvas__WEBPACK_IMPORTED_MODULE_55__.zoomToFit)({\n targetElements,\n appState: this.state,\n fitToViewport: !!(opts === null || opts === void 0 ? void 0 : opts.fitToViewport),\n viewportZoomFactor: opts === null || opts === void 0 ? void 0 : opts.viewportZoomFactor\n });\n zoom = appState.zoom;\n scrollX = appState.scrollX;\n scrollY = appState.scrollY;\n } else {\n // compute only the viewport location, without any zoom adjustment\n const scroll = (0,_scene__WEBPACK_IMPORTED_MODULE_29__.calculateScrollCenter)(targetElements, this.state);\n scrollX = scroll.scrollX;\n scrollY = scroll.scrollY;\n } // when animating, we use RequestAnimationFrame to prevent the animation\n // from slowing down other processes\n\n\n if (opts === null || opts === void 0 ? void 0 : opts.animate) {\n const origScrollX = this.state.scrollX;\n const origScrollY = this.state.scrollY;\n const origZoom = this.state.zoom.value;\n const cancel = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.easeToValuesRAF)({\n fromValues: {\n scrollX: origScrollX,\n scrollY: origScrollY,\n zoom: origZoom\n },\n toValues: {\n scrollX,\n scrollY,\n zoom: zoom.value\n },\n interpolateValue: (from, to, progress, key) => {\n // for zoom, use different easing\n if (key === \"zoom\") {\n return from * Math.pow(to / from, (0,_utils__WEBPACK_IMPORTED_MODULE_33__.easeOut)(progress));\n } // handle using default\n\n\n return undefined;\n },\n onStep: ({\n scrollX,\n scrollY,\n zoom\n }) => {\n this.setState({\n scrollX,\n scrollY,\n zoom: {\n value: zoom\n }\n });\n },\n onStart: () => {\n this.setState({\n shouldCacheIgnoreZoom: true\n });\n },\n onEnd: () => {\n this.setState({\n shouldCacheIgnoreZoom: false\n });\n },\n onCancel: () => {\n this.setState({\n shouldCacheIgnoreZoom: false\n });\n },\n duration: (_b = opts === null || opts === void 0 ? void 0 : opts.duration) !== null && _b !== void 0 ? _b : 500\n });\n\n this.cancelInProgresAnimation = () => {\n cancel();\n this.cancelInProgresAnimation = null;\n };\n } else {\n this.setState({\n scrollX,\n scrollY,\n zoom\n });\n }\n };\n /** use when changing scrollX/scrollY/zoom based on user interaction */\n\n\n this.translateCanvas = state => {\n var _a;\n\n (_a = this.cancelInProgresAnimation) === null || _a === void 0 ? void 0 : _a.call(this);\n this.setState(state);\n }; //zsviczian\n\n\n this.zoomToFit = (target = this.scene.getNonDeletedElements(), maxZoom = 1, //null will zoom to max based on viewport\n margin = 0.03) => {\n if (!target) {\n target = this.scene.getNonDeletedElements();\n }\n\n if (target.length === 0) {\n maxZoom = 1;\n }\n\n this.setState((0,_actions_actionCanvas__WEBPACK_IMPORTED_MODULE_55__.zoomToFitElements)(target, this.state, false, this, maxZoom, margin).appState);\n }; //zsviczian\n\n\n this.startLineEditor = (el, selectedPointsIndices = null) => {\n if (!el || !(0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(el)) {\n return;\n }\n\n const editingLinearElement = new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(el, this.scene);\n this.setState({\n selectedLinearElement: editingLinearElement,\n editingLinearElement: Object.assign(Object.assign({}, editingLinearElement), {\n selectedPointsIndices\n })\n });\n }; //zsviczian\n\n\n this.updateContainerSize = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(containers => {\n containers.forEach(el => {\n const [x, y] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.rotate)(el.x + el.width, el.y + el.height, el.x + el.width / 2, el.y + el.height / 2, el.angle);\n (0,_element_resizeElements__WEBPACK_IMPORTED_MODULE_45__.resizeSingleElement)(new Map().set(el.id, el), false, el, \"se\", true, x, y);\n });\n });\n\n this.setToast = toast => {\n this.setState({\n toast\n });\n };\n\n this.restoreFileFromShare = async () => {\n try {\n const webShareTargetCache = await caches.open(\"web-share-target\");\n const response = await webShareTargetCache.match(\"shared-file\");\n\n if (response) {\n const blob = await response.blob();\n const file = new File([blob], blob.name || \"\", {\n type: blob.type\n });\n this.loadFileToCanvas(file, null);\n await webShareTargetCache.delete(\"shared-file\");\n window.history.replaceState(null, _constants__WEBPACK_IMPORTED_MODULE_12__.APP_NAME, window.location.pathname);\n }\n } catch (error) {\n this.setState({\n errorMessage: error.message\n });\n }\n };\n /** adds supplied files to existing files in the appState */\n\n\n this.addFiles = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(files => {\n const filesMap = files.reduce((acc, fileData) => {\n acc.set(fileData.id, fileData);\n return acc;\n }, new Map());\n this.files = Object.assign(Object.assign({}, this.files), Object.fromEntries(filesMap));\n this.scene.getNonDeletedElements().forEach(element => {\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isInitializedImageElement)(element) && filesMap.has(element.fileId)) {\n this.imageCache.delete(element.fileId);\n _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_66__.ShapeCache[\"delete\"](element);\n }\n });\n this.scene.informMutation();\n this.addNewImagesToImageCache();\n }); //zsviczian https://github.com/zsviczian/excalibrain/issues/9\n\n this.setMobileModeAllowed = allow => {\n const {\n width,\n height\n } = this.excalidrawContainerRef.current.getBoundingClientRect();\n this.allowMobileMode = allow;\n\n if (allow) {\n this.device = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateObject)(this.device, {\n isMobile: width < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_WIDTH_PORTRAIT || height < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_HEIGHT_LANDSCAPE && width < _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_WIDTH_LANDSCAPE\n });\n } else {\n this.device = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateObject)(this.device, {\n isMobile: false\n });\n }\n\n this.forceUpdate();\n }; //zsviczian\n\n\n this.setLocalFont = showOnPanel => {\n showFourthFont = showOnPanel;\n };\n\n this.selectElements = elements => {\n this.updateScene({\n appState: Object.assign(Object.assign({}, this.state), {\n editingGroupId: null,\n selectedElementIds: elements.reduce((map, element) => {\n map[element.id] = true;\n return map;\n }, {})\n }),\n commitToHistory: true\n });\n };\n\n this.bringToFront = elements => {\n this.selectElements(elements);\n this.updateScene(_actions__WEBPACK_IMPORTED_MODULE_5__.actionBringToFront.perform(this.scene.getNonDeletedElements(), this.state));\n };\n\n this.bringForward = elements => {\n this.selectElements(elements);\n this.updateScene(_actions__WEBPACK_IMPORTED_MODULE_5__.actionBringForward.perform(this.scene.getNonDeletedElements(), this.state));\n };\n\n this.sendToBack = elements => {\n this.selectElements(elements);\n this.updateScene(_actions__WEBPACK_IMPORTED_MODULE_5__.actionSendToBack.perform(this.scene.getNonDeletedElements(), this.state));\n };\n\n this.sendBackward = elements => {\n this.selectElements(elements);\n this.updateScene(_actions__WEBPACK_IMPORTED_MODULE_5__.actionSendBackward.perform(this.scene.getNonDeletedElements(), this.state));\n };\n\n this.updateScene = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(sceneData => {\n if (sceneData.commitToHistory) {\n this.history.resumeRecording();\n }\n\n (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.flushSync)(() => {\n if (sceneData.appState) {\n this.setState(sceneData.appState);\n }\n });\n\n if (sceneData.elements) {\n this.scene.replaceAllElements(sceneData.elements);\n }\n\n if (sceneData.collaborators) {\n this.setState({\n collaborators: sceneData.collaborators\n });\n }\n });\n\n this.onSceneUpdated = () => {\n this.setState({});\n };\n /**\r\n * @returns whether the menu was toggled on or off\r\n */\n\n\n this.toggleSidebar = ({\n name,\n tab,\n force\n }) => {\n var _a;\n\n let nextName;\n\n if (force === undefined) {\n nextName = ((_a = this.state.openSidebar) === null || _a === void 0 ? void 0 : _a.name) === name ? null : name;\n } else {\n nextName = force ? name : null;\n }\n\n this.setState({\n openSidebar: nextName ? {\n name: nextName,\n tab\n } : null\n });\n return !!nextName;\n };\n\n this.updateCurrentCursorPosition = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n this.lastViewportPosition.x = event.clientX;\n this.lastViewportPosition.y = event.clientY;\n }); // Input handling\n\n this.onKeyDown = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n // normalize `event.key` when CapsLock is pressed #2372\n if (\"Proxy\" in window && (!event.shiftKey && /^[A-Z]$/.test(event.key) || event.shiftKey && /^[a-z]$/.test(event.key))) {\n event = new Proxy(event, {\n get(ev, prop) {\n const value = ev[prop];\n\n if (typeof value === \"function\") {\n // fix for Proxies hijacking `this`\n return value.bind(ev);\n }\n\n return prop === \"key\" ? // CapsLock inverts capitalization based on ShiftKey, so invert\n // it back\n event.shiftKey ? ev.key.toUpperCase() : ev.key.toLowerCase() : value;\n }\n\n });\n }\n\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && event.key.toLowerCase() === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.V) {\n IS_PLAIN_PASTE = event.shiftKey;\n clearTimeout(IS_PLAIN_PASTE_TIMER); // reset (100ms to be safe that we it runs after the ensuing\n // paste event). Though, technically unnecessary to reset since we\n // (re)set the flag before each paste event.\n\n IS_PLAIN_PASTE_TIMER = window.setTimeout(() => {\n IS_PLAIN_PASTE = false;\n }, 100);\n } // prevent browser zoom in input fields\n\n\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && (0,_utils__WEBPACK_IMPORTED_MODULE_33__.isWritableElement)(event.target)) {\n if (event.code === _keys__WEBPACK_IMPORTED_MODULE_26__.CODES.MINUS || event.code === _keys__WEBPACK_IMPORTED_MODULE_26__.CODES.EQUAL) {\n event.preventDefault();\n return;\n }\n } // bail if\n\n\n if ( // inside an input\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.isWritableElement)(event.target) && // unless pressing escape (finalize action)\n event.key !== _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ESCAPE || // or unless using arrows (to move between buttons)\n (0,_keys__WEBPACK_IMPORTED_MODULE_26__.isArrowKey)(event.key) && (0,_utils__WEBPACK_IMPORTED_MODULE_33__.isInputLike)(event.target)) {\n return;\n }\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.QUESTION_MARK) {\n this.setState({\n openDialog: \"help\"\n });\n return;\n } else if (event.key.toLowerCase() === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.E && event.shiftKey && event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) {\n event.preventDefault();\n this.setState({\n openDialog: \"imageExport\"\n });\n return;\n }\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.PAGE_UP || event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.PAGE_DOWN) {\n let offset = (event.shiftKey ? this.state.width : this.state.height) / this.state.zoom.value;\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.PAGE_DOWN) {\n offset = -offset;\n }\n\n if (event.shiftKey) {\n this.translateCanvas(state => ({\n scrollX: state.scrollX + offset\n }));\n } else {\n this.translateCanvas(state => ({\n scrollY: state.scrollY + offset\n }));\n }\n }\n\n if (this.actionManager.handleKeyDown(event)) {\n return;\n }\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.K && !event.altKey && !event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) {\n if ((0,_appState__WEBPACK_IMPORTED_MODULE_10__.isLaserPointerActive)(this.state)) {\n this.setActiveTool({\n type: this.state.viewModeEnabled ? \"hand\" : \"selection\"\n });\n } else {\n this.setActiveTool({\n type: \"laser\"\n });\n }\n\n return;\n }\n\n if (this.state.viewModeEnabled) {\n //revert to hand in case a key is pressed (K is handled above)\n if (event.key !== _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.K) {\n this.setActiveTool({\n type: \"hand\"\n });\n }\n\n return;\n }\n\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && this.state.isBindingEnabled) {\n this.setState({\n isBindingEnabled: false\n });\n }\n\n if ((0,_keys__WEBPACK_IMPORTED_MODULE_26__.isArrowKey)(event.key)) {\n const step = this.state.gridSize && (event.shiftKey ? _constants__WEBPACK_IMPORTED_MODULE_12__.ELEMENT_TRANSLATE_AMOUNT : this.state.gridSize) || (event.shiftKey ? _constants__WEBPACK_IMPORTED_MODULE_12__.ELEMENT_SHIFT_TRANSLATE_AMOUNT : _constants__WEBPACK_IMPORTED_MODULE_12__.ELEMENT_TRANSLATE_AMOUNT);\n let offsetX = 0;\n let offsetY = 0;\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ARROW_LEFT) {\n offsetX = -step;\n } else if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ARROW_RIGHT) {\n offsetX = step;\n } else if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ARROW_UP) {\n offsetY = -step;\n } else if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ARROW_DOWN) {\n offsetY = step;\n }\n\n const selectedElements = this.scene.getSelectedElements({\n selectedElementIds: this.state.selectedElementIds,\n includeBoundTextElement: true,\n includeElementsInFrames: true\n });\n selectedElements.forEach(element => {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n x: element.x + offsetX,\n y: element.y + offsetY\n });\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.updateBoundElements)(element, {\n simultaneouslyUpdated: selectedElements\n });\n });\n this.maybeSuggestBindingForAll(selectedElements);\n event.preventDefault();\n } else if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ENTER) {\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (selectedElements.length === 1) {\n const selectedElement = selectedElements[0];\n\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) {\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(selectedElement)) {\n if (!this.state.editingLinearElement || this.state.editingLinearElement.elementId !== selectedElements[0].id) {\n this.history.resumeRecording();\n this.setState({\n editingLinearElement: new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(selectedElement, this.scene)\n });\n }\n }\n } else if ((0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(selectedElement) || (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.isValidTextContainer)(selectedElement)) {\n let container;\n\n if (!(0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(selectedElement)) {\n container = selectedElement;\n }\n\n const midPoint = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getContainerCenter)(selectedElement, this.state);\n const sceneX = midPoint.x;\n const sceneY = midPoint.y;\n this.startTextEditing({\n sceneX,\n sceneY,\n container\n });\n event.preventDefault();\n return;\n } else if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isFrameElement)(selectedElement)) {\n this.setState({\n editingFrame: selectedElement.id\n });\n }\n }\n } else if (!event.ctrlKey && !event.altKey && !event.metaKey && this.state.draggingElement === null) {\n const shape = (0,_shapes__WEBPACK_IMPORTED_MODULE_32__.findShapeByKey)(event.key);\n\n if (shape) {\n if (this.state.activeTool.type !== shape) {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_9__.trackEvent)(\"toolbar\", shape, `keyboard (${this.device.isMobile ? \"mobile\" : \"desktop\"})`);\n }\n\n this.setActiveTool({\n type: shape\n });\n event.stopPropagation();\n } else if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.Q) {\n this.toggleLock(\"keyboard\");\n event.stopPropagation();\n }\n }\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.SPACE && gesture.pointers.size === 0) {\n isHoldingSpace = true;\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRAB);\n event.preventDefault();\n }\n\n if ((event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.G || event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.S) && !event.altKey && !event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) {\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (this.state.activeTool.type === \"selection\" && !selectedElements.length) {\n return;\n }\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.G && ((0,_scene__WEBPACK_IMPORTED_MODULE_29__.hasBackground)(this.state.activeTool.type) || selectedElements.some(element => (0,_scene__WEBPACK_IMPORTED_MODULE_29__.hasBackground)(element.type)))) {\n this.setState({\n openPopup: \"elementBackground\"\n });\n event.stopPropagation();\n }\n\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.S) {\n this.setState({\n openPopup: \"elementStroke\"\n });\n event.stopPropagation();\n }\n }\n\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.BACKSPACE || event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.DELETE)) {\n _jotai__WEBPACK_IMPORTED_MODULE_56__.jotaiStore.set(_ActiveConfirmDialog__WEBPACK_IMPORTED_MODULE_57__.activeConfirmDialogAtom, \"clearCanvas\");\n } // eye dropper\n // -----------------------------------------------------------------------\n\n\n const lowerCased = event.key.toLocaleLowerCase();\n const isPickingStroke = lowerCased === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.S && event.shiftKey;\n const isPickingBackground = event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.I || lowerCased === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.G && event.shiftKey;\n\n if (isPickingStroke || isPickingBackground) {\n this.openEyeDropper({\n type: isPickingStroke ? \"stroke\" : \"background\"\n });\n } // -----------------------------------------------------------------------\n\n });\n this.onWheel = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n // prevent browser pinch zoom on DOM elements\n if (!(event.target instanceof HTMLCanvasElement) && event.ctrlKey) {\n event.preventDefault();\n }\n });\n this.onKeyUp = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n if (event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.SPACE) {\n if (this.state.viewModeEnabled) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRAB);\n } else if (this.state.activeTool.type === \"selection\") {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n selectedGroupIds: {},\n editingGroupId: null,\n activeEmbeddable: null\n });\n }\n\n isHoldingSpace = false;\n }\n\n if (!event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && !this.state.isBindingEnabled) {\n this.setState({\n isBindingEnabled: true\n });\n }\n\n if ((0,_keys__WEBPACK_IMPORTED_MODULE_26__.isArrowKey)(event.key)) {\n const selectedElements = this.scene.getSelectedElements(this.state);\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.isBindingEnabled)(this.state) ? (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.bindOrUnbindSelectedElements)(selectedElements) : (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.unbindLinearElements)(selectedElements);\n this.setState({\n suggestedBindings: []\n });\n }\n });\n\n this.setActiveTool = tool => {\n const nextActiveTool = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, tool);\n\n if (nextActiveTool.type === \"hand\") {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRAB);\n } else if (!isHoldingSpace) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n }\n\n if ((0,_utils__WEBPACK_IMPORTED_MODULE_33__.isToolIcon)(document.activeElement)) {\n this.focusContainer();\n }\n\n if (!(0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElementType)(nextActiveTool.type)) {\n this.setState({\n suggestedBindings: []\n });\n }\n\n if (nextActiveTool.type === \"image\") {\n this.onImageAction();\n }\n\n this.setState(prevState => {\n const commonResets = {\n snapLines: prevState.snapLines.length ? [] : prevState.snapLines,\n originSnapOffset: null,\n activeEmbeddable: null\n };\n\n if (nextActiveTool.type !== \"selection\") {\n return Object.assign(Object.assign(Object.assign({}, prevState), {\n activeTool: nextActiveTool,\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(nextActiveTool.type === \"mermaid\" //zsviczian\n ? this.state.selectedElementIds : {}, prevState),\n selectedGroupIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, prevState),\n editingGroupId: null,\n multiElement: null\n }), commonResets);\n }\n\n return Object.assign(Object.assign(Object.assign({}, prevState), {\n activeTool: nextActiveTool\n }), commonResets);\n });\n };\n\n this.setCursor = cursor => {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, cursor);\n };\n\n this.resetCursor = () => {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n };\n /**\r\n * returns whether user is making a gesture with >= 2 fingers (points)\r\n * on o touch screen (not on a trackpad). Currently only relates to Darwin\r\n * (iOS/iPadOS,MacOS), but may work on other devices in the future if\r\n * GestureEvent is standardized.\r\n */\n\n\n this.isTouchScreenMultiTouchGesture = () => {\n // we don't want to deselect when using trackpad, and multi-point gestures\n // only work on touch screens, so checking for >= pointers means we're on a\n // touchscreen\n return gesture.pointers.size >= 2;\n }; // fires only on Safari\n\n\n this.onGestureStart = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n event.preventDefault(); // we only want to deselect on touch screens because user may have selected\n // elements by mistake while zooming\n\n if (this.isTouchScreenMultiTouchGesture()) {\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n activeEmbeddable: null\n });\n }\n\n gesture.initialScale = this.state.zoom.value;\n }); // fires only on Safari\n\n this.onGestureChange = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n event.preventDefault(); // onGestureChange only has zoom factor but not the center.\n // If we're on iPad or iPhone, then we recognize multi-touch and will\n // zoom in at the right location in the touchmove handler\n // (handleCanvasPointerMove).\n //\n // On Macbook trackpad, we don't have those events so will zoom in at the\n // current location instead.\n //\n // As such, bail from this handler on touch devices.\n\n if (this.isTouchScreenMultiTouchGesture()) {\n return;\n }\n\n const initialScale = gesture.initialScale;\n\n if (initialScale) {\n this.setState(state => Object.assign({}, (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_31__.getStateForZoom)({\n viewportX: this.lastViewportPosition.x,\n viewportY: this.lastViewportPosition.y,\n nextZoom: (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getNormalizedZoom)(initialScale * event.scale)\n }, state)));\n }\n }); // fires only on Safari\n\n this.onGestureEnd = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n event.preventDefault(); // reselect elements only on touch screens (see onGestureStart)\n\n if (this.isTouchScreenMultiTouchGesture()) {\n this.setState({\n previousSelectedElementIds: {},\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(this.state.previousSelectedElementIds, this.state)\n });\n }\n\n gesture.initialScale = null;\n });\n\n this.startTextEditing = ({\n sceneX,\n sceneY,\n insertAtParentCenter = true,\n container\n }) => {\n var _a, _b;\n\n let shouldBindToContainer = false;\n let parentCenterPosition = insertAtParentCenter && this.getTextWysiwygSnappedToCenterPosition(sceneX, sceneY, this.state, container);\n\n if (container && parentCenterPosition) {\n const boundTextElementToContainer = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getBoundTextElement)(container);\n\n if (!boundTextElementToContainer) {\n shouldBindToContainer = true;\n }\n }\n\n let existingTextElement = null;\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (selectedElements.length === 1) {\n if ((0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(selectedElements[0])) {\n existingTextElement = selectedElements[0];\n } else if (container) {\n existingTextElement = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getBoundTextElement)(selectedElements[0]);\n } else {\n existingTextElement = this.getTextElementAtPosition(sceneX, sceneY);\n }\n } else {\n existingTextElement = this.getTextElementAtPosition(sceneX, sceneY);\n }\n\n const fontFamily = (existingTextElement === null || existingTextElement === void 0 ? void 0 : existingTextElement.fontFamily) || this.state.currentItemFontFamily;\n const lineHeight = (existingTextElement === null || existingTextElement === void 0 ? void 0 : existingTextElement.lineHeight) || (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getDefaultLineHeight)(fontFamily);\n const fontSize = this.state.currentItemFontSize;\n\n if (!existingTextElement && shouldBindToContainer && container && !(0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isArrowElement)(container)) {\n const fontString = {\n fontSize,\n fontFamily\n };\n const minWidth = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getApproxMinLineWidth)((0,_utils__WEBPACK_IMPORTED_MODULE_33__.getFontString)(fontString), lineHeight);\n const minHeight = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getApproxMinLineHeight)(fontSize, lineHeight);\n const newHeight = Math.max(container.height, minHeight);\n const newWidth = Math.max(container.width, minWidth);\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(container, {\n height: newHeight,\n width: newWidth\n });\n sceneX = container.x + newWidth / 2;\n sceneY = container.y + newHeight / 2;\n\n if (parentCenterPosition) {\n parentCenterPosition = this.getTextWysiwygSnappedToCenterPosition(sceneX, sceneY, this.state, container);\n }\n }\n\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords({\n x: sceneX,\n y: sceneY\n });\n const element = existingTextElement ? existingTextElement : (0,_element__WEBPACK_IMPORTED_MODULE_16__.newTextElement)({\n x: parentCenterPosition ? parentCenterPosition.elementCenterX : sceneX,\n y: parentCenterPosition ? parentCenterPosition.elementCenterY : sceneY,\n strokeColor: this.state.currentItemStrokeColor,\n backgroundColor: this.state.currentItemBackgroundColor,\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roughness: this.state.currentItemRoughness,\n opacity: this.state.currentItemOpacity,\n text: \"\",\n rawText: \"\",\n fontSize,\n fontFamily,\n textAlign: parentCenterPosition ? \"center\" : this.state.currentItemTextAlign,\n verticalAlign: parentCenterPosition ? _constants__WEBPACK_IMPORTED_MODULE_12__.VERTICAL_ALIGN.MIDDLE : _constants__WEBPACK_IMPORTED_MODULE_12__.DEFAULT_VERTICAL_ALIGN,\n containerId: shouldBindToContainer ? container === null || container === void 0 ? void 0 : container.id : undefined,\n groupIds: (_a = container === null || container === void 0 ? void 0 : container.groupIds) !== null && _a !== void 0 ? _a : [],\n lineHeight,\n angle: (_b = container === null || container === void 0 ? void 0 : container.angle) !== null && _b !== void 0 ? _b : 0,\n frameId: topLayerFrame ? topLayerFrame.id : null\n });\n\n if (!existingTextElement && shouldBindToContainer && container) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(container, {\n boundElements: (container.boundElements || []).concat({\n type: \"text\",\n id: element.id\n })\n });\n }\n\n this.setState({\n editingElement: element\n });\n\n if (!existingTextElement) {\n if (container && shouldBindToContainer) {\n const containerIndex = this.scene.getElementIndex(container.id);\n this.scene.insertElementAtIndex(element, containerIndex + 1);\n } else {\n this.scene.addNewElement(element);\n }\n }\n\n this.setState({\n editingElement: element\n });\n this.handleTextWysiwyg(element, {\n isExistingElement: !!existingTextElement\n });\n };\n\n this.handleCanvasDoubleClick = event => {\n // case: double-clicking with arrow/line tool selected would both create\n // text and enter multiElement mode\n if (this.state.multiElement) {\n return;\n }\n\n if (this.state.viewModeEnabled) {\n if (this.state.activeTool.type === \"laser\") {\n this.setActiveTool({\n type: \"selection\"\n });\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRAB);\n } else {\n this.setActiveTool({\n type: \"laser\"\n });\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.CROSSHAIR);\n }\n\n return;\n } // we should only be able to double click when mode is selection\n\n\n if (this.state.activeTool.type !== \"selection\") {\n return;\n }\n\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (selectedElements.length === 1 && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(selectedElements[0])) {\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && (!this.state.editingLinearElement || this.state.editingLinearElement.elementId !== selectedElements[0].id)) {\n this.history.resumeRecording();\n this.setState({\n editingLinearElement: new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(selectedElements[0], this.scene)\n });\n return;\n } else if (this.state.editingLinearElement && this.state.editingLinearElement.elementId === selectedElements[0].id) {\n return;\n }\n }\n\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n let {\n x: sceneX,\n y: sceneY\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n const selectedGroupIds = (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getSelectedGroupIds)(this.state);\n\n if (selectedGroupIds.length > 0) {\n const hitElement = this.getElementAtPosition(sceneX, sceneY);\n const selectedGroupId = hitElement && (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getSelectedGroupIdForElement)(hitElement, this.state.selectedGroupIds);\n\n if (selectedGroupId) {\n this.setState(prevState => Object.assign(Object.assign({}, prevState), (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: selectedGroupId,\n selectedElementIds: {\n [hitElement.id]: true\n }\n }, this.scene.getNonDeletedElements(), prevState, this)));\n return;\n }\n }\n\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n\n if (!event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] && !this.state.viewModeEnabled) {\n const hitElement = this.getElementAtPosition(sceneX, sceneY);\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement)) {\n this.setState({\n activeEmbeddable: {\n element: hitElement,\n state: \"active\"\n }\n });\n return;\n }\n\n const container = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getTextBindableContainerAtPosition)(this.scene.getNonDeletedElements(), this.state, sceneX, sceneY);\n\n if (container) {\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.hasBoundTextElement)(container) || !(0,_utils__WEBPACK_IMPORTED_MODULE_33__.isTransparent)(container.backgroundColor) || (0,_element_collision__WEBPACK_IMPORTED_MODULE_44__.isHittingElementNotConsideringBoundingBox)(container, this.state, this.frameNameBoundsCache, [sceneX, sceneY])) {\n const midPoint = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getContainerCenter)(container, this.state);\n sceneX = midPoint.x;\n sceneY = midPoint.y;\n }\n }\n\n this.startTextEditing({\n sceneX,\n sceneY,\n insertAtParentCenter: !event.altKey,\n container\n });\n }\n };\n\n this.getElementLinkAtPosition = (scenePointer, hitElement) => {\n // Reversing so we traverse the elements in decreasing order\n // of z-index\n const elements = this.scene.getNonDeletedElements().slice().reverse();\n let hitElementIndex = Infinity;\n return elements.find((element, index) => {\n if (hitElement && element.id === hitElement.id) {\n hitElementIndex = index;\n }\n\n return element.link && index <= hitElementIndex && (0,_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.isPointHittingLink)(element, this.state, [scenePointer.x, scenePointer.y], this.device.isMobile);\n });\n };\n\n this.redirectToLink = (event, isTouchScreen) => {\n const draggedDistance = (0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(this.lastPointerDownEvent.clientX, this.lastPointerDownEvent.clientY, this.lastPointerUpEvent.clientX, this.lastPointerUpEvent.clientY);\n\n if (!this.hitLinkElement || // For touch screen allow dragging threshold else strict check\n isTouchScreen && draggedDistance > _constants__WEBPACK_IMPORTED_MODULE_12__.DRAGGING_THRESHOLD || !isTouchScreen && draggedDistance !== 0) {\n return;\n }\n\n const lastPointerDownCoords = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(this.lastPointerDownEvent, this.state);\n const lastPointerDownHittingLinkIcon = (0,_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.isPointHittingLink)(this.hitLinkElement, this.state, [lastPointerDownCoords.x, lastPointerDownCoords.y], this.device.isMobile);\n const lastPointerUpCoords = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(this.lastPointerUpEvent, this.state);\n const lastPointerUpHittingLinkIcon = (0,_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.isPointHittingLink)(this.hitLinkElement, this.state, [lastPointerUpCoords.x, lastPointerUpCoords.y], this.device.isMobile);\n\n if (lastPointerDownHittingLinkIcon && lastPointerUpHittingLinkIcon) {\n let url = this.hitLinkElement.link;\n\n if (url) {\n url = (0,_data_url__WEBPACK_IMPORTED_MODULE_47__.normalizeLink)(url);\n let customEvent;\n\n if (this.props.onLinkOpen) {\n customEvent = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.wrapEvent)(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.EXCALIDRAW_LINK, event.nativeEvent);\n this.props.onLinkOpen(Object.assign(Object.assign({}, this.hitLinkElement), {\n link: url\n }), customEvent);\n }\n\n if (!(customEvent === null || customEvent === void 0 ? void 0 : customEvent.defaultPrevented)) {\n const target = (0,_data_url__WEBPACK_IMPORTED_MODULE_47__.isLocalLink)(url) ? \"_self\" : \"_blank\";\n const newWindow = window.open(undefined, target); // https://mathiasbynens.github.io/rel-noopener/\n\n if (newWindow) {\n newWindow.opener = null;\n newWindow.location = url;\n }\n }\n }\n }\n };\n\n this.getTopLayerFrameAtSceneCoords = sceneCoords => {\n const frames = this.scene.getNonDeletedFrames().filter(frame => (0,_frame__WEBPACK_IMPORTED_MODULE_51__.isCursorInFrame)(sceneCoords, frame));\n return frames.length ? frames[frames.length - 1] : null;\n };\n\n this.handleCanvasPointerMove = event => {\n var _a, _b;\n\n this.savePointer(event.clientX, event.clientY, this.state.cursorButton);\n\n if (gesture.pointers.has(event.pointerId)) {\n gesture.pointers.set(event.pointerId, {\n x: event.clientX,\n y: event.clientY\n });\n }\n\n const initialScale = gesture.initialScale;\n\n if (gesture.pointers.size === 2 && gesture.lastCenter && initialScale && gesture.initialDistance) {\n const center = (0,_gesture__WEBPACK_IMPORTED_MODULE_22__.getCenter)(gesture.pointers);\n const deltaX = center.x - gesture.lastCenter.x;\n const deltaY = center.y - gesture.lastCenter.y;\n gesture.lastCenter = center;\n const distance = (0,_gesture__WEBPACK_IMPORTED_MODULE_22__.getDistance)(Array.from(gesture.pointers.values()));\n const scaleFactor = !this.state.allowPinchZoom && //zsviczian\n this.state.activeTool.type === \"freedraw\" && this.state.penMode ? 1 : distance / gesture.initialDistance;\n const nextZoom = scaleFactor ? (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getNormalizedZoom)(initialScale * scaleFactor) : this.state.zoom.value;\n this.setState(state => {\n const zoomState = (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_31__.getStateForZoom)({\n viewportX: center.x,\n viewportY: center.y,\n nextZoom\n }, state);\n this.translateCanvas({\n zoom: zoomState.zoom,\n scrollX: zoomState.scrollX + deltaX / nextZoom,\n scrollY: zoomState.scrollY + deltaY / nextZoom,\n shouldCacheIgnoreZoom: true\n });\n });\n this.resetShouldCacheIgnoreZoomDebounced();\n } else {\n gesture.lastCenter = gesture.initialDistance = gesture.initialScale = null;\n }\n\n if (isHoldingSpace || isPanning || isDraggingScrollBar || (0,_appState__WEBPACK_IMPORTED_MODULE_10__.isHandToolActive)(this.state)) {\n return;\n }\n\n const isPointerOverScrollBars = (0,_scene__WEBPACK_IMPORTED_MODULE_29__.isOverScrollBars)(currentScrollBars, event.clientX - this.state.offsetLeft, event.clientY - this.state.offsetTop);\n const isOverScrollBar = isPointerOverScrollBars.isOverEither;\n\n if (!this.state.draggingElement && !this.state.multiElement) {\n if (isOverScrollBar) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n }\n }\n\n const scenePointer = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n const {\n x: scenePointerX,\n y: scenePointerY\n } = scenePointer;\n\n if (!this.state.draggingElement && (0,_snapping__WEBPACK_IMPORTED_MODULE_58__.isActiveToolNonLinearSnappable)(this.state.activeTool.type)) {\n const {\n originOffset,\n snapLines\n } = (0,_snapping__WEBPACK_IMPORTED_MODULE_58__.getSnapLinesAtPointer)(this.scene.getNonDeletedElements(), this.state, {\n x: scenePointerX,\n y: scenePointerY\n }, event);\n this.setState({\n snapLines,\n originSnapOffset: originOffset\n });\n } else if (!this.state.draggingElement) {\n this.setState({\n snapLines: []\n });\n }\n\n if (this.state.editingLinearElement && !this.state.editingLinearElement.isDragging) {\n const editingLinearElement = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.handlePointerMove(event, scenePointerX, scenePointerY, this.state);\n\n if (editingLinearElement && editingLinearElement !== this.state.editingLinearElement) {\n // Since we are reading from previous state which is not possible with\n // automatic batching in React 18 hence using flush sync to synchronously\n // update the state. Check https://github.com/excalidraw/excalidraw/pull/5508 for more details.\n (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.flushSync)(() => {\n this.setState({\n editingLinearElement\n });\n });\n }\n\n if ((editingLinearElement === null || editingLinearElement === void 0 ? void 0 : editingLinearElement.lastUncommittedPoint) != null) {\n this.maybeSuggestBindingAtCursor(scenePointer);\n } else {\n // causes stack overflow if not sync\n (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.flushSync)(() => {\n this.setState({\n suggestedBindings: []\n });\n });\n }\n }\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBindingElementType)(this.state.activeTool.type)) {\n // Hovering with a selected tool or creating new linear element via click\n // and point\n const {\n draggingElement\n } = this.state;\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBindingElement)(draggingElement, false)) {\n this.maybeSuggestBindingsForLinearElementAtCoords(draggingElement, [scenePointer], this.state.startBoundElement);\n } else {\n this.maybeSuggestBindingAtCursor(scenePointer);\n }\n }\n\n if (this.state.multiElement) {\n const {\n multiElement\n } = this.state;\n const {\n x: rx,\n y: ry\n } = multiElement;\n const {\n points,\n lastCommittedPoint\n } = multiElement;\n const lastPoint = points[points.length - 1];\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n\n if (lastPoint === lastCommittedPoint) {\n // if we haven't yet created a temp point and we're beyond commit-zone\n // threshold, add a point\n if ((0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(scenePointerX - rx, scenePointerY - ry, lastPoint[0], lastPoint[1]) >= _constants__WEBPACK_IMPORTED_MODULE_12__.LINE_CONFIRM_THRESHOLD) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(multiElement, {\n points: [...points, [scenePointerX - rx, scenePointerY - ry]]\n });\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER); // in this branch, we're inside the commit zone, and no uncommitted\n // point exists. Thus do nothing (don't add/remove points).\n }\n } else if (points.length > 2 && lastCommittedPoint && (0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(scenePointerX - rx, scenePointerY - ry, lastCommittedPoint[0], lastCommittedPoint[1]) < _constants__WEBPACK_IMPORTED_MODULE_12__.LINE_CONFIRM_THRESHOLD) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER);\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(multiElement, {\n points: points.slice(0, -1)\n });\n } else {\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(scenePointerX, scenePointerY, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize);\n const [lastCommittedX, lastCommittedY] = (_a = multiElement === null || multiElement === void 0 ? void 0 : multiElement.lastCommittedPoint) !== null && _a !== void 0 ? _a : [0, 0];\n let dxFromLastCommitted = gridX - rx - lastCommittedX;\n let dyFromLastCommitted = gridY - ry - lastCommittedY;\n\n if ((0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldRotateWithDiscreteAngle)(event)) {\n ({\n width: dxFromLastCommitted,\n height: dyFromLastCommitted\n } = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getLockedLinearCursorAlignSize)( // actual coordinate of the last committed point\n lastCommittedX + rx, lastCommittedY + ry, // cursor-grid coordinate\n gridX, gridY));\n }\n\n if ((0,_math__WEBPACK_IMPORTED_MODULE_28__.isPathALoop)(points, this.state.zoom.value)) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER);\n } // update last uncommitted point\n\n\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(multiElement, {\n points: [...points.slice(0, -1), [lastCommittedX + dxFromLastCommitted, lastCommittedY + dyFromLastCommitted]]\n });\n }\n\n return;\n }\n\n const hasDeselectedButton = Boolean(event.buttons);\n\n if (hasDeselectedButton || this.state.activeTool.type !== \"selection\" && this.state.activeTool.type !== \"text\" && this.state.activeTool.type !== \"eraser\") {\n return;\n }\n\n const elements = this.scene.getNonDeletedElements();\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (selectedElements.length === 1 && !isOverScrollBar && !this.state.editingLinearElement) {\n const elementWithTransformHandleType = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getElementWithTransformHandleType)(elements, this.state, scenePointerX, scenePointerY, this.state.zoom, event.pointerType);\n\n if (elementWithTransformHandleType && elementWithTransformHandleType.transformHandleType) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, (0,_element__WEBPACK_IMPORTED_MODULE_16__.getCursorForResizingElement)(elementWithTransformHandleType));\n return;\n }\n } else if (selectedElements.length > 1 && !isOverScrollBar) {\n const transformHandleType = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getTransformHandleTypeFromCoords)((0,_element__WEBPACK_IMPORTED_MODULE_16__.getCommonBounds)(selectedElements), scenePointerX, scenePointerY, this.state.zoom, event.pointerType);\n\n if (transformHandleType) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, (0,_element__WEBPACK_IMPORTED_MODULE_16__.getCursorForResizingElement)({\n transformHandleType\n }));\n return;\n }\n }\n\n const hitElement = this.getElementAtPosition(scenePointer.x, scenePointer.y);\n this.hitLinkElement = this.getElementLinkAtPosition(scenePointer, hitElement);\n\n if ((0,_appState__WEBPACK_IMPORTED_MODULE_10__.isEraserActive)(this.state)) {\n return;\n }\n\n if (this.hitLinkElement && !this.state.selectedElementIds[this.hitLinkElement.id]) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER);\n (0,_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.showHyperlinkTooltip)(this.hitLinkElement, this.state);\n\n if (this.props.onLinkHover) {\n this.props.onLinkHover(this.hitLinkElement, event);\n } //zsviczian\n\n } else {\n (0,_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.hideHyperlinkToolip)();\n\n if (hitElement && (hitElement.link || (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement)) && this.state.selectedElementIds[hitElement.id] && !this.state.contextMenu && !this.state.showHyperlinkPopup) {\n this.setState({\n showHyperlinkPopup: \"info\"\n });\n } else if (this.state.activeTool.type === \"text\") {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(hitElement) ? _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.TEXT : _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.CROSSHAIR);\n } else if (this.state.viewModeEnabled) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRAB);\n } else if (isOverScrollBar) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.AUTO);\n } else if (this.state.selectedLinearElement) {\n this.handleHoverSelectedLinearElement(this.state.selectedLinearElement, scenePointerX, scenePointerY);\n } else if ( // if using cmd/ctrl, we're not dragging\n !event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) {\n if ((hitElement || this.isHittingCommonBoundingBoxOfSelectedElements(scenePointer, selectedElements)) && !(hitElement === null || hitElement === void 0 ? void 0 : hitElement.locked)) {\n if (hitElement && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement) && this.isEmbeddableCenter(hitElement, event, scenePointerX, scenePointerY)) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER);\n this.setState({\n activeEmbeddable: {\n element: hitElement,\n state: \"hover\"\n }\n });\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.MOVE);\n\n if (((_b = this.state.activeEmbeddable) === null || _b === void 0 ? void 0 : _b.state) === \"hover\") {\n this.setState({\n activeEmbeddable: null\n });\n }\n }\n }\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.AUTO);\n }\n }\n };\n\n this.handleEraser = (event, pointerDownState, scenePointer) => {\n const updateElementIds = elements => {\n elements.forEach(element => {\n if (element.locked) {\n return;\n }\n\n idsToUpdate.push(element.id);\n\n if (event.altKey) {\n if (pointerDownState.elementIdsToErase[element.id] && pointerDownState.elementIdsToErase[element.id].erase) {\n pointerDownState.elementIdsToErase[element.id].erase = false;\n }\n } else if (!pointerDownState.elementIdsToErase[element.id]) {\n pointerDownState.elementIdsToErase[element.id] = {\n erase: true,\n opacity: element.opacity\n };\n }\n });\n };\n\n const idsToUpdate = [];\n const distance = (0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(pointerDownState.lastCoords.x, pointerDownState.lastCoords.y, scenePointer.x, scenePointer.y);\n const threshold = 10 / this.state.zoom.value;\n const point = Object.assign({}, pointerDownState.lastCoords);\n let samplingInterval = 0;\n\n while (samplingInterval <= distance) {\n const hitElements = this.getElementsAtPosition(point.x, point.y);\n updateElementIds(hitElements); // Exit since we reached current point\n\n if (samplingInterval === distance) {\n break;\n } // Calculate next point in the line at a distance of sampling interval\n\n\n samplingInterval = Math.min(samplingInterval + threshold, distance);\n const distanceRatio = samplingInterval / distance;\n const nextX = (1 - distanceRatio) * point.x + distanceRatio * scenePointer.x;\n const nextY = (1 - distanceRatio) * point.y + distanceRatio * scenePointer.y;\n point.x = nextX;\n point.y = nextY;\n }\n\n const elements = this.scene.getElementsIncludingDeleted().map(ele => {\n const id = (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBoundToContainer)(ele) && idsToUpdate.includes(ele.containerId) ? ele.containerId : ele.id;\n\n if (idsToUpdate.includes(id)) {\n if (event.altKey) {\n if (pointerDownState.elementIdsToErase[id] && pointerDownState.elementIdsToErase[id].erase === false) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n opacity: pointerDownState.elementIdsToErase[id].opacity\n });\n }\n } else {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n opacity: _constants__WEBPACK_IMPORTED_MODULE_12__.ELEMENT_READY_TO_ERASE_OPACITY\n });\n }\n }\n\n return ele;\n });\n this.scene.replaceAllElements(elements);\n pointerDownState.lastCoords.x = scenePointer.x;\n pointerDownState.lastCoords.y = scenePointer.y;\n }; // set touch moving for mobile context menu\n\n\n this.handleTouchMove = event => {\n invalidateContextMenu = true;\n };\n\n this.handleCanvasPointerDown = event => {\n var _a, _b;\n\n this.focusContainer(); //zsviczian\n // since contextMenu options are potentially evaluated on each render,\n // and an contextMenu action may depend on selection state, we must\n // close the contextMenu before we update the selection on pointerDown\n // (e.g. resetting selection)\n\n if (this.state.contextMenu) {\n this.setState({\n contextMenu: null\n });\n }\n\n if (this.state.snapLines) {\n this.setAppState({\n snapLines: []\n });\n }\n\n this.updateGestureOnPointerDown(event); // if dragging element is freedraw and another pointerdown event occurs\n // a second finger is on the screen\n // discard the freedraw element if it is very short because it is likely\n // just a spike, otherwise finalize the freedraw element when the second\n // finger is lifted\n\n if (event.pointerType === \"touch\" && this.state.draggingElement && this.state.draggingElement.type === \"freedraw\") {\n const element = this.state.draggingElement;\n this.updateScene(Object.assign(Object.assign({}, element.points.length < 10 ? {\n elements: this.scene.getElementsIncludingDeleted().filter(el => el.id !== element.id)\n } : {}), {\n appState: {\n draggingElement: null,\n editingElement: null,\n startBoundElement: null,\n suggestedBindings: [],\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.keys(this.state.selectedElementIds).filter(key => key !== element.id).reduce((obj, key) => {\n obj[key] = this.state.selectedElementIds[key];\n return obj;\n }, {}), this.state)\n }\n }));\n return;\n } // remove any active selection when we start to interact with canvas\n // (mainly, we care about removing selection outside the component which\n // would prevent our copy handling otherwise)\n\n\n const selection = document.getSelection();\n\n if (selection === null || selection === void 0 ? void 0 : selection.anchorNode) {\n selection.removeAllRanges();\n }\n\n this.maybeOpenContextMenuAfterPointerDownOnTouchDevices(event);\n this.maybeCleanupAfterMissingPointerUp(event); //fires only once, if pen is detected, penMode is enabled\n //the user can disable this by toggling the penMode button\n\n if (!this.state.penDetected && event.pointerType === \"pen\") {\n this.setState(prevState => {\n return {\n penMode: true,\n penDetected: true\n };\n });\n }\n\n if (!this.device.isTouchScreen && [\"pen\", \"touch\"].includes(event.pointerType)) {\n this.device = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateObject)(this.device, {\n isTouchScreen: true\n });\n }\n\n if (isPanning) {\n return;\n }\n\n if (this.handleCanvasPanUsingWheelOrSpaceDrag(event)) {\n return;\n }\n\n this.lastPointerDownEvent = event;\n this.setState({\n lastPointerDownWith: event.pointerType,\n cursorButton: \"down\"\n });\n this.savePointer(event.clientX, event.clientY, \"down\"); // only handle left mouse button or touch\n\n if (event.button !== _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_BUTTON.MAIN && event.button !== _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_BUTTON.TOUCH) {\n return;\n } // don't select while panning\n\n\n if (gesture.pointers.size > 1) {\n return;\n } // State for the duration of a pointer interaction, which starts with a\n // pointerDown event, ends with a pointerUp event (or another pointerDown)\n\n\n const pointerDownState = this.initialPointerDownState(event);\n this.setState({\n selectedElementsAreBeingDragged: false\n });\n\n if (this.handleDraggingScrollBar(event, pointerDownState)) {\n return;\n }\n\n this.clearSelectionIfNotUsingSelection();\n this.updateBindingEnabledOnPointerMove(event);\n\n if (this.handleSelectionOnPointerDown(event, pointerDownState)) {\n return;\n }\n\n const allowOnPointerDown = !this.state.penMode || event.pointerType !== \"touch\" || this.state.activeTool.type === \"selection\" || this.state.activeTool.type === \"text\" || this.state.activeTool.type === \"image\";\n\n if (!allowOnPointerDown) {\n return;\n }\n\n if (this.state.activeTool.type === \"text\") {\n this.handleTextOnPointerDown(event, pointerDownState);\n return;\n } else if (this.state.activeTool.type === \"arrow\" || this.state.activeTool.type === \"line\") {\n this.handleLinearElementOnPointerDown(event, this.state.activeTool.type, pointerDownState);\n } else if (this.state.activeTool.type === \"image\") {\n // reset image preview on pointerdown\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.CROSSHAIR); // retrieve the latest element as the state may be stale\n\n const pendingImageElement = this.state.pendingImageElementId && this.scene.getElement(this.state.pendingImageElementId);\n\n if (!pendingImageElement) {\n return;\n }\n\n this.setState({\n draggingElement: pendingImageElement,\n editingElement: pendingImageElement,\n pendingImageElementId: null,\n multiElement: null\n });\n const {\n x,\n y\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(pendingImageElement, {\n x,\n y\n });\n } else if (this.state.activeTool.type === \"freedraw\") {\n this.handleFreeDrawElementOnPointerDown(event, this.state.activeTool.type, pointerDownState);\n } else if (this.state.activeTool.type === \"custom\") {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.AUTO);\n } else if (this.state.activeTool.type === \"frame\") {\n this.createFrameElementOnPointerDown(pointerDownState);\n } else if (this.state.activeTool.type === \"laser\") {\n this.laserPathManager.startPath(pointerDownState.lastCoords.x, pointerDownState.lastCoords.y);\n } else if (this.state.activeTool.type !== \"eraser\" && this.state.activeTool.type !== \"hand\" && this.state.activeTool.type !== \"mermaid\") {\n this.createGenericElementOnPointerDown(this.state.activeTool.type, pointerDownState);\n }\n\n (_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.onPointerDown) === null || _b === void 0 ? void 0 : _b.call(_a, this.state.activeTool, pointerDownState);\n const onPointerMove = this.onPointerMoveFromPointerDownHandler(pointerDownState);\n const onPointerUp = this.onPointerUpFromPointerDownHandler(pointerDownState);\n const onKeyDown = this.onKeyDownFromPointerDownHandler(pointerDownState);\n const onKeyUp = this.onKeyUpFromPointerDownHandler(pointerDownState);\n lastPointerUp = onPointerUp;\n\n if (!this.state.viewModeEnabled || this.state.activeTool.type === \"laser\") {\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_MOVE, onPointerMove);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, onPointerUp);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYDOWN, onKeyDown);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYUP, onKeyUp);\n pointerDownState.eventListeners.onMove = onPointerMove;\n pointerDownState.eventListeners.onUp = onPointerUp;\n pointerDownState.eventListeners.onKeyUp = onKeyUp;\n pointerDownState.eventListeners.onKeyDown = onKeyDown;\n }\n };\n\n this.handleCanvasPointerUp = event => {\n var _a, _b;\n\n this.removePointer(event);\n this.lastPointerUpEvent = event;\n const scenePointer = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: event.clientX,\n clientY: event.clientY\n }, this.state);\n const clicklength = event.timeStamp - ((_b = (_a = this.lastPointerDownEvent) === null || _a === void 0 ? void 0 : _a.timeStamp) !== null && _b !== void 0 ? _b : 0);\n\n if (this.device.isMobile && clicklength < 300) {\n const hitElement = this.getElementAtPosition(scenePointer.x, scenePointer.y);\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement) && this.isEmbeddableCenter(hitElement, event, scenePointer.x, scenePointer.y)) {\n this.handleEmbeddableCenterClick(hitElement);\n return;\n }\n }\n\n if (this.device.isTouchScreen) {\n const hitElement = this.getElementAtPosition(scenePointer.x, scenePointer.y);\n this.hitLinkElement = this.getElementLinkAtPosition(scenePointer, hitElement);\n }\n\n if (this.hitLinkElement && !this.state.selectedElementIds[this.hitLinkElement.id]) {\n if (clicklength < 300 && this.hitLinkElement.type === \"embeddable\" && !(0,_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.isPointHittingLinkIcon)(this.hitLinkElement, this.state, [scenePointer.x, scenePointer.y])) {\n this.handleEmbeddableCenterClick(this.hitLinkElement);\n } else {\n this.redirectToLink(event, this.device.isTouchScreen);\n }\n } else if (this.state.viewModeEnabled) {\n this.setState({\n activeEmbeddable: null,\n selectedElementIds: {}\n });\n }\n };\n\n this.maybeOpenContextMenuAfterPointerDownOnTouchDevices = event => {\n // deal with opening context menu on touch devices\n if (event.pointerType === \"touch\") {\n invalidateContextMenu = false;\n\n if (touchTimeout) {\n // If there's already a touchTimeout, this means that there's another\n // touch down and we are doing another touch, so we shouldn't open the\n // context menu.\n invalidateContextMenu = true;\n } else {\n // open the context menu with the first touch's clientX and clientY\n // if the touch is not moving\n touchTimeout = window.setTimeout(() => {\n touchTimeout = 0;\n\n if (!invalidateContextMenu) {\n this.handleCanvasContextMenu(event);\n }\n }, _constants__WEBPACK_IMPORTED_MODULE_12__.TOUCH_CTX_MENU_TIMEOUT);\n }\n }\n };\n\n this.resetContextMenuTimer = () => {\n clearTimeout(touchTimeout);\n touchTimeout = 0;\n invalidateContextMenu = false;\n }; // Returns whether the event is a panning\n\n\n this.handleCanvasPanUsingWheelOrSpaceDrag = event => {\n if (!(gesture.pointers.size <= 1 && (event.button === _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_BUTTON.WHEEL || event.button === _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_BUTTON.MAIN && isHoldingSpace || (0,_appState__WEBPACK_IMPORTED_MODULE_10__.isHandToolActive)(this.state) || this.state.viewModeEnabled && !(0,_appState__WEBPACK_IMPORTED_MODULE_10__.isLaserPointerActive)(this.state))) || (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(this.state.editingElement)) {\n return false;\n }\n\n isPanning = true;\n event.preventDefault();\n let nextPastePrevented = false;\n const isLinux = /Linux/.test(window.navigator.platform);\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRABBING);\n let {\n clientX: lastX,\n clientY: lastY\n } = event;\n const onPointerMove = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdatesThrottled)(event => {\n const deltaX = lastX - event.clientX;\n const deltaY = lastY - event.clientY;\n lastX = event.clientX;\n lastY = event.clientY;\n /*\r\n * Prevent paste event if we move while middle clicking on Linux.\r\n * See issue #1383.\r\n */\n\n if (isLinux && !nextPastePrevented && (Math.abs(deltaX) > 1 || Math.abs(deltaY) > 1)) {\n nextPastePrevented = true;\n /* Prevent the next paste event */\n\n const preventNextPaste = event => {\n document.body.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.PASTE, preventNextPaste);\n event.stopPropagation();\n };\n /*\r\n * Reenable next paste in case of disabled middle click paste for\r\n * any reason:\r\n * - right click paste\r\n * - empty clipboard\r\n */\n\n\n const enableNextPaste = () => {\n setTimeout(() => {\n document.body.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.PASTE, preventNextPaste);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, enableNextPaste);\n }, 100);\n };\n\n document.body.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.PASTE, preventNextPaste);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, enableNextPaste);\n }\n\n this.translateCanvas({\n scrollX: this.state.scrollX - deltaX / this.state.zoom.value,\n scrollY: this.state.scrollY - deltaY / this.state.zoom.value\n });\n });\n const teardown = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(lastPointerUp = () => {\n lastPointerUp = null;\n isPanning = false;\n\n if (!isHoldingSpace) {\n if (this.state.viewModeEnabled) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.GRAB);\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n }\n }\n\n this.setState({\n cursorButton: \"up\"\n });\n this.savePointer(event.clientX, event.clientY, \"up\");\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_MOVE, onPointerMove);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, teardown);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.BLUR, teardown);\n onPointerMove.flush();\n });\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.BLUR, teardown);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_MOVE, onPointerMove, {\n passive: true\n });\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, teardown);\n return true;\n };\n\n this.clearSelectionIfNotUsingSelection = () => {\n if (this.state.activeTool.type !== \"selection\") {\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n selectedGroupIds: {},\n editingGroupId: null,\n activeEmbeddable: null\n });\n }\n };\n /**\r\n * @returns whether the pointer event has been completely handled\r\n */\n\n\n this.handleSelectionOnPointerDown = (event, pointerDownState) => {\n var _a;\n\n if (this.state.activeTool.type === \"selection\") {\n const elements = this.scene.getNonDeletedElements();\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (selectedElements.length === 1 && !this.state.editingLinearElement) {\n const elementWithTransformHandleType = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getElementWithTransformHandleType)(elements, this.state, pointerDownState.origin.x, pointerDownState.origin.y, this.state.zoom, event.pointerType);\n\n if (elementWithTransformHandleType != null) {\n this.setState({\n resizingElement: elementWithTransformHandleType.element\n });\n pointerDownState.resize.handleType = elementWithTransformHandleType.transformHandleType;\n }\n } else if (selectedElements.length > 1) {\n pointerDownState.resize.handleType = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getTransformHandleTypeFromCoords)((0,_element__WEBPACK_IMPORTED_MODULE_16__.getCommonBounds)(selectedElements), pointerDownState.origin.x, pointerDownState.origin.y, this.state.zoom, event.pointerType);\n }\n\n if (pointerDownState.resize.handleType) {\n pointerDownState.resize.isResizing = true;\n pointerDownState.resize.offset = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.tupleToCoors)((0,_element__WEBPACK_IMPORTED_MODULE_16__.getResizeOffsetXY)(pointerDownState.resize.handleType, selectedElements, pointerDownState.origin.x, pointerDownState.origin.y));\n\n if (selectedElements.length === 1 && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(selectedElements[0]) && selectedElements[0].points.length === 2) {\n pointerDownState.resize.arrowDirection = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getResizeArrowDirection)(pointerDownState.resize.handleType, selectedElements[0]);\n }\n } else {\n if (this.state.selectedLinearElement) {\n const linearElementEditor = this.state.editingLinearElement || this.state.selectedLinearElement;\n const ret = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.handlePointerDown(event, this.state, this.history, pointerDownState.origin, linearElementEditor);\n\n if (ret.hitElement) {\n pointerDownState.hit.element = ret.hitElement;\n }\n\n if (ret.linearElementEditor) {\n this.setState({\n selectedLinearElement: ret.linearElementEditor\n });\n\n if (this.state.editingLinearElement) {\n this.setState({\n editingLinearElement: ret.linearElementEditor\n });\n }\n }\n\n if (ret.didAddPoint) {\n return true;\n }\n } // hitElement may already be set above, so check first\n\n\n pointerDownState.hit.element = (_a = pointerDownState.hit.element) !== null && _a !== void 0 ? _a : this.getElementAtPosition(pointerDownState.origin.x, pointerDownState.origin.y);\n\n if (pointerDownState.hit.element) {\n // Early return if pointer is hitting link icon\n const hitLinkElement = this.getElementLinkAtPosition({\n x: pointerDownState.origin.x,\n y: pointerDownState.origin.y\n }, pointerDownState.hit.element);\n\n if (hitLinkElement) {\n return false;\n }\n } // For overlapped elements one position may hit\n // multiple elements\n\n\n pointerDownState.hit.allHitElements = this.getElementsAtPosition(pointerDownState.origin.x, pointerDownState.origin.y);\n const hitElement = pointerDownState.hit.element;\n const someHitElementIsSelected = pointerDownState.hit.allHitElements.some(element => this.isASelectedElement(element));\n\n if ((hitElement === null || !someHitElementIsSelected) && !event.shiftKey && !pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements) {\n this.clearSelection(hitElement);\n }\n\n if (this.state.editingLinearElement) {\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({\n [this.state.editingLinearElement.elementId]: true\n }, this.state)\n }); // If we click on something\n } else if (hitElement != null) {\n // on CMD/CTRL, drill down to hit element regardless of groups etc.\n if (event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) {\n if (!this.state.selectedElementIds[hitElement.id]) {\n pointerDownState.hit.wasAddedToSelection = true;\n }\n\n this.setState(prevState => Object.assign(Object.assign({}, (0,_groups__WEBPACK_IMPORTED_MODULE_23__.editGroupForSelectedElement)(prevState, hitElement)), {\n previousSelectedElementIds: this.state.selectedElementIds\n })); // mark as not completely handled so as to allow dragging etc.\n\n return false;\n } // deselect if item is selected\n // if shift is not clicked, this will always return true\n // otherwise, it will trigger selection based on current\n // state of the box\n\n\n if (!this.state.selectedElementIds[hitElement.id]) {\n // if we are currently editing a group, exiting editing mode and deselect the group.\n if (this.state.editingGroupId && !(0,_groups__WEBPACK_IMPORTED_MODULE_23__.isElementInGroup)(hitElement, this.state.editingGroupId)) {\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n selectedGroupIds: {},\n editingGroupId: null,\n activeEmbeddable: null\n });\n } // Add hit element to selection. At this point if we're not holding\n // SHIFT the previously selected element(s) were deselected above\n // (make sure you use setState updater to use latest state)\n // With shift-selection, we want to make sure that frames and their containing\n // elements are not selected at the same time.\n\n\n if (!someHitElementIsSelected && !pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements) {\n this.setState(prevState => {\n const nextSelectedElementIds = Object.assign(Object.assign({}, prevState.selectedElementIds), {\n [hitElement.id]: true\n });\n const previouslySelectedElements = [];\n Object.keys(prevState.selectedElementIds).forEach(id => {\n const element = this.scene.getElement(id);\n element && previouslySelectedElements.push(element);\n }); // if hitElement is frame, deselect all of its elements if they are selected\n\n if (hitElement.type === \"frame\") {\n (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getFrameElements)(previouslySelectedElements, hitElement.id).forEach(element => {\n delete nextSelectedElementIds[element.id];\n });\n } else if (hitElement.frameId) {\n // if hitElement is in a frame and its frame has been selected\n // disable selection for the given element\n if (nextSelectedElementIds[hitElement.frameId]) {\n delete nextSelectedElementIds[hitElement.id];\n }\n } else {\n // hitElement is neither a frame nor an element in a frame\n // but since hitElement could be in a group with some frames\n // this means selecting hitElement will have the frames selected as well\n // because we want to keep the invariant:\n // - frames and their elements are not selected at the same time\n // we deselect elements in those frames that were previously selected\n const groupIds = hitElement.groupIds;\n const framesInGroups = new Set(groupIds.flatMap(gid => (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getElementsInGroup)(this.scene.getNonDeletedElements(), gid)).filter(element => element.type === \"frame\").map(frame => frame.id));\n\n if (framesInGroups.size > 0) {\n previouslySelectedElements.forEach(element => {\n if (element.frameId && framesInGroups.has(element.frameId)) {\n // deselect element and groups containing the element\n delete nextSelectedElementIds[element.id];\n element.groupIds.flatMap(gid => (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getElementsInGroup)(this.scene.getNonDeletedElements(), gid)).forEach(element => {\n delete nextSelectedElementIds[element.id];\n });\n }\n });\n }\n }\n\n return Object.assign(Object.assign({}, (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: prevState.editingGroupId,\n selectedElementIds: nextSelectedElementIds\n }, this.scene.getNonDeletedElements(), prevState, this)), {\n showHyperlinkPopup: hitElement.link || (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement) ? \"info\" : false\n });\n });\n pointerDownState.hit.wasAddedToSelection = true;\n }\n }\n }\n\n this.setState({\n previousSelectedElementIds: this.state.selectedElementIds\n });\n }\n }\n\n return false;\n };\n\n this.handleTextOnPointerDown = (event, pointerDownState) => {\n // if we're currently still editing text, clicking outside\n // should only finalize it, not create another (irrespective\n // of state.activeTool.locked)\n if ((0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(this.state.editingElement)) {\n return;\n }\n\n let sceneX = pointerDownState.origin.x;\n let sceneY = pointerDownState.origin.y;\n const element = this.getElementAtPosition(sceneX, sceneY, {\n includeBoundTextElement: true\n }); // FIXME\n\n let container = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getTextBindableContainerAtPosition)(this.scene.getNonDeletedElements(), this.state, sceneX, sceneY);\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.hasBoundTextElement)(element)) {\n container = element;\n sceneX = element.x + element.width / 2;\n sceneY = element.y + element.height / 2;\n }\n\n this.startTextEditing({\n sceneX,\n sceneY,\n insertAtParentCenter: !event.altKey,\n container\n });\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n\n if (!this.state.activeTool.locked) {\n this.setState({\n activeTool: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, {\n type: \"selection\"\n })\n });\n }\n };\n\n this.handleFreeDrawElementOnPointerDown = (event, elementType, pointerDownState) => {\n // Begin a mark capture. This does not have to update state yet.\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerDownState.origin.x, pointerDownState.origin.y, null);\n const strokeOptions = this.state.currentStrokeOptions; //zsviczian\n\n const simulatePressure = (strokeOptions === null || strokeOptions === void 0 ? void 0 : strokeOptions.constantPressure) ? false : event.pressure === 0.5;\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords({\n x: gridX,\n y: gridY\n });\n const element = (0,_element_newElement__WEBPACK_IMPORTED_MODULE_20__.newFreeDrawElement)(Object.assign(Object.assign({\n type: elementType,\n x: gridX,\n y: gridY,\n strokeColor: this.state.currentItemStrokeColor,\n backgroundColor: this.state.currentItemBackgroundColor,\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roughness: this.state.currentItemRoughness,\n opacity: this.state.currentItemOpacity,\n roundness: null,\n simulatePressure,\n locked: false\n }, strokeOptions //zsviczian\n ? {\n customData: {\n strokeOptions\n }\n } : {}), {\n frameId: topLayerFrame ? topLayerFrame.id : null\n }));\n this.setState(prevState => {\n const nextSelectedElementIds = Object.assign({}, prevState.selectedElementIds);\n delete nextSelectedElementIds[element.id];\n return {\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(nextSelectedElementIds, prevState)\n };\n });\n const pressures = element.simulatePressure ? element.pressures : [//zsviczian\n ...element.pressures, (strokeOptions === null || strokeOptions === void 0 ? void 0 : strokeOptions.constantPressure) ? 1 : event.pressure];\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n points: [[0, 0]],\n pressures\n });\n const boundElement = (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.getHoveredElementForBinding)(pointerDownState.origin, this.scene);\n\n if (strokeOptions === null || strokeOptions === void 0 ? void 0 : strokeOptions.highlighter) {\n //zsviczian\n this.scene.replaceAllElements([element, ...this.scene.getElementsIncludingDeleted()]);\n } else {\n this.scene.addNewElement(element);\n }\n\n this.setState({\n draggingElement: element,\n editingElement: element,\n startBoundElement: boundElement,\n suggestedBindings: []\n });\n }; //create rectangle element with youtube top left on nearest grid point width / hight 640/360\n\n\n this.insertEmbeddableElement = ({\n sceneX,\n sceneY,\n link\n }) => {\n var _a;\n\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(sceneX, sceneY, ((_a = this.lastPointerDownEvent) === null || _a === void 0 ? void 0 : _a[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) ? null : this.state.gridSize);\n const embedLink = (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.getEmbedLink)(link);\n\n if (!embedLink) {\n return;\n }\n\n if (embedLink.warning) {\n this.setToast({\n message: embedLink.warning,\n closable: true\n });\n }\n\n const element = (0,_element_newElement__WEBPACK_IMPORTED_MODULE_20__.newEmbeddableElement)({\n type: \"embeddable\",\n x: gridX,\n y: gridY,\n strokeColor: \"transparent\",\n backgroundColor: \"transparent\",\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roughness: this.state.currentItemRoughness,\n roundness: this.getCurrentItemRoundness(\"embeddable\"),\n opacity: this.state.currentItemOpacity,\n locked: false,\n width: embedLink.aspectRatio.w,\n height: embedLink.aspectRatio.h,\n link,\n validated: null\n });\n this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted(), element]);\n return element;\n };\n\n this.createImageElement = ({\n sceneX,\n sceneY\n }) => {\n var _a;\n\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(sceneX, sceneY, ((_a = this.lastPointerDownEvent) === null || _a === void 0 ? void 0 : _a[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) ? null : this.state.gridSize);\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords({\n x: gridX,\n y: gridY\n });\n const element = (0,_element__WEBPACK_IMPORTED_MODULE_16__.newImageElement)({\n type: \"image\",\n x: gridX,\n y: gridY,\n strokeColor: this.state.currentItemStrokeColor,\n backgroundColor: this.state.currentItemBackgroundColor,\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roughness: this.state.currentItemRoughness,\n roundness: null,\n opacity: this.state.currentItemOpacity,\n locked: false,\n frameId: topLayerFrame ? topLayerFrame.id : null\n });\n return element;\n };\n\n this.handleLinearElementOnPointerDown = (event, elementType, pointerDownState) => {\n if (this.state.multiElement) {\n const {\n multiElement\n } = this.state; // finalize if completing a loop\n\n if (multiElement.type === \"line\" && (0,_math__WEBPACK_IMPORTED_MODULE_28__.isPathALoop)(multiElement.points, this.state.zoom.value)) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(multiElement, {\n lastCommittedPoint: multiElement.points[multiElement.points.length - 1]\n });\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n return;\n }\n\n const {\n x: rx,\n y: ry,\n lastCommittedPoint\n } = multiElement; // clicking inside commit zone → finalize arrow\n\n if (multiElement.points.length > 1 && lastCommittedPoint && (0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(pointerDownState.origin.x - rx, pointerDownState.origin.y - ry, lastCommittedPoint[0], lastCommittedPoint[1]) < _constants__WEBPACK_IMPORTED_MODULE_12__.LINE_CONFIRM_THRESHOLD) {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n return;\n }\n\n this.setState(prevState => ({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.assign(Object.assign({}, prevState.selectedElementIds), {\n [multiElement.id]: true\n }), prevState)\n })); // clicking outside commit zone → update reference for last committed\n // point\n\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(multiElement, {\n lastCommittedPoint: multiElement.points[multiElement.points.length - 1]\n });\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER);\n } else {\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerDownState.origin.x, pointerDownState.origin.y, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize);\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords({\n x: gridX,\n y: gridY\n });\n /* If arrow is pre-arrowheads, it will have undefined for both start and end arrowheads.\r\n If so, we want it to be null for start and \"arrow\" for end. If the linear item is not\r\n an arrow, we want it to be null for both. Otherwise, we want it to use the\r\n values from appState. */\n\n const {\n currentItemStartArrowhead,\n currentItemEndArrowhead\n } = this.state;\n const [startArrowhead, endArrowhead] = elementType === \"arrow\" ? [currentItemStartArrowhead, currentItemEndArrowhead] : [null, null];\n const element = (0,_element__WEBPACK_IMPORTED_MODULE_16__.newLinearElement)({\n type: elementType,\n x: gridX,\n y: gridY,\n strokeColor: this.state.currentItemStrokeColor,\n backgroundColor: this.state.currentItemBackgroundColor,\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roughness: this.state.currentItemRoughness,\n opacity: this.state.currentItemOpacity,\n roundness: this.state.currentItemRoundness === \"round\" ? {\n type: _constants__WEBPACK_IMPORTED_MODULE_12__.ROUNDNESS.PROPORTIONAL_RADIUS\n } : null,\n startArrowhead,\n endArrowhead,\n locked: false,\n frameId: topLayerFrame ? topLayerFrame.id : null\n });\n this.setState(prevState => {\n const nextSelectedElementIds = Object.assign({}, prevState.selectedElementIds);\n delete nextSelectedElementIds[element.id];\n return {\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(nextSelectedElementIds, prevState)\n };\n });\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n points: [...element.points, [0, 0]]\n });\n const boundElement = (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.getHoveredElementForBinding)(pointerDownState.origin, this.scene);\n this.scene.addNewElement(element);\n this.setState({\n draggingElement: element,\n editingElement: element,\n startBoundElement: boundElement,\n suggestedBindings: []\n });\n }\n };\n\n this.createGenericElementOnPointerDown = (elementType, pointerDownState) => {\n var _a;\n\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerDownState.origin.x, pointerDownState.origin.y, ((_a = this.lastPointerDownEvent) === null || _a === void 0 ? void 0 : _a[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) ? null : this.state.gridSize);\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords({\n x: gridX,\n y: gridY\n });\n const baseElementAttributes = {\n x: gridX,\n y: gridY,\n strokeColor: this.state.currentItemStrokeColor,\n backgroundColor: this.state.currentItemBackgroundColor,\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roughness: this.state.currentItemRoughness,\n opacity: this.state.currentItemOpacity,\n roundness: this.getCurrentItemRoundness(elementType),\n locked: false,\n frameId: topLayerFrame ? topLayerFrame.id : null\n };\n let element;\n\n if (elementType === \"embeddable\") {\n element = (0,_element_newElement__WEBPACK_IMPORTED_MODULE_20__.newEmbeddableElement)(Object.assign({\n type: \"embeddable\",\n validated: null\n }, baseElementAttributes));\n } else {\n element = (0,_element__WEBPACK_IMPORTED_MODULE_16__.newElement)(Object.assign({\n type: elementType\n }, baseElementAttributes));\n }\n\n if (element.type === \"selection\") {\n this.setState({\n selectionElement: element,\n draggingElement: element\n });\n } else {\n this.scene.addNewElement(element);\n this.setState({\n multiElement: null,\n draggingElement: element,\n editingElement: element\n });\n }\n };\n\n this.createFrameElementOnPointerDown = pointerDownState => {\n var _a;\n\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerDownState.origin.x, pointerDownState.origin.y, ((_a = this.lastPointerDownEvent) === null || _a === void 0 ? void 0 : _a[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]) ? null : this.state.gridSize);\n const frame = (0,_element_newElement__WEBPACK_IMPORTED_MODULE_20__.newFrameElement)(Object.assign({\n x: gridX,\n y: gridY,\n opacity: this.state.currentItemOpacity,\n locked: false\n }, _constants__WEBPACK_IMPORTED_MODULE_12__.FRAME_STYLE));\n this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted(), frame]);\n this.setState({\n multiElement: null,\n draggingElement: frame,\n editingElement: frame\n });\n };\n\n this.restoreReadyToEraseElements = pointerDownState => {\n const elements = this.scene.getElementsIncludingDeleted().map(ele => {\n if (pointerDownState.elementIdsToErase[ele.id] && pointerDownState.elementIdsToErase[ele.id].erase) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n opacity: pointerDownState.elementIdsToErase[ele.id].opacity\n });\n } else if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBoundToContainer)(ele) && pointerDownState.elementIdsToErase[ele.containerId] && pointerDownState.elementIdsToErase[ele.containerId].erase) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n opacity: pointerDownState.elementIdsToErase[ele.containerId].opacity\n });\n } else if (ele.frameId && pointerDownState.elementIdsToErase[ele.frameId] && pointerDownState.elementIdsToErase[ele.frameId].erase) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n opacity: pointerDownState.elementIdsToErase[ele.frameId].opacity\n });\n }\n\n return ele;\n });\n this.scene.replaceAllElements(elements);\n };\n\n this.eraseElements = pointerDownState => {\n const elements = this.scene.getElementsIncludingDeleted().map(ele => {\n if (pointerDownState.elementIdsToErase[ele.id] && pointerDownState.elementIdsToErase[ele.id].erase) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n isDeleted: true\n });\n } else if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBoundToContainer)(ele) && pointerDownState.elementIdsToErase[ele.containerId] && pointerDownState.elementIdsToErase[ele.containerId].erase) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n isDeleted: true\n });\n } else if (ele.frameId && pointerDownState.elementIdsToErase[ele.frameId] && pointerDownState.elementIdsToErase[ele.frameId].erase) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(ele, {\n isDeleted: true\n });\n }\n\n return ele;\n });\n this.history.resumeRecording();\n this.scene.replaceAllElements(elements);\n };\n\n this.initializeImage = async ({\n imageFile,\n imageElement: _imageElement,\n showCursorImagePreview = false\n }) => {\n var _a, _b, _c, _d; // at this point this should be guaranteed image file, but we do this check\n // to satisfy TS down the line\n\n\n if (!(0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.isSupportedImageFile)(imageFile)) {\n throw new Error((0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.unsupportedFileType\"));\n }\n\n const mimeType = imageFile.type;\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, \"wait\");\n\n if (mimeType === _constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.svg) {\n try {\n imageFile = (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.SVGStringToFile)(await (0,_element_image__WEBPACK_IMPORTED_MODULE_40__.normalizeSVG)(await imageFile.text()), imageFile.name);\n } catch (error) {\n console.warn(error);\n throw new Error((0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.svgImageInsertError\"));\n }\n } // generate image id (by default the file digest) before any\n // resizing/compression takes place to keep it more portable\n\n\n const fileId = await (((_b = (_a = this.props).generateIdForFile) === null || _b === void 0 ? void 0 : _b.call(_a, imageFile)) || (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.generateIdFromFile)(imageFile));\n\n if (!fileId) {\n console.warn(\"Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one.\");\n throw new Error((0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.imageInsertError\"));\n }\n\n const existingFileData = this.files[fileId];\n\n if (!(existingFileData === null || existingFileData === void 0 ? void 0 : existingFileData.dataURL)) {\n try {\n imageFile = await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.resizeImageFile)(imageFile, {\n maxWidthOrHeight: _constants__WEBPACK_IMPORTED_MODULE_12__.DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT\n });\n } catch (error) {\n console.error(\"error trying to resing image file on insertion\", error);\n }\n\n if (imageFile.size > _constants__WEBPACK_IMPORTED_MODULE_12__.MAX_ALLOWED_FILE_BYTES) {\n throw new Error((0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.fileTooBig\", {\n maxSize: `${Math.trunc(_constants__WEBPACK_IMPORTED_MODULE_12__.MAX_ALLOWED_FILE_BYTES / 1024 / 1024)}MB`\n }));\n }\n }\n\n if (showCursorImagePreview) {\n const dataURL = (_c = this.files[fileId]) === null || _c === void 0 ? void 0 : _c.dataURL; // optimization so that we don't unnecessarily resize the original\n // full-size file for cursor preview\n // (it's much faster to convert the resized dataURL to File)\n\n const resizedFile = dataURL && (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.dataURLToFile)(dataURL);\n this.setImagePreviewCursor(resizedFile || imageFile);\n }\n\n const dataURL = ((_d = this.files[fileId]) === null || _d === void 0 ? void 0 : _d.dataURL) || (await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.getDataURL)(imageFile));\n const imageElement = (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(_imageElement, {\n fileId\n }, false);\n return new Promise(async (resolve, reject) => {\n var _a;\n\n try {\n this.files = Object.assign(Object.assign({}, this.files), {\n [fileId]: {\n mimeType,\n id: fileId,\n dataURL,\n created: Date.now(),\n lastRetrieved: Date.now()\n }\n });\n const cachedImageData = this.imageCache.get(fileId);\n\n if (!cachedImageData) {\n this.addNewImagesToImageCache();\n await this.updateImageCache([imageElement]);\n }\n\n if ((cachedImageData === null || cachedImageData === void 0 ? void 0 : cachedImageData.image) instanceof Promise) {\n await cachedImageData.image;\n }\n\n if (this.state.pendingImageElementId !== imageElement.id && ((_a = this.state.draggingElement) === null || _a === void 0 ? void 0 : _a.id) !== imageElement.id) {\n this.initializeImageDimensions(imageElement, true);\n }\n\n resolve(imageElement);\n } catch (error) {\n console.error(error);\n reject(new Error((0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.imageInsertError\")));\n } finally {\n if (!showCursorImagePreview) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n }\n }\n });\n };\n /**\r\n * inserts image into elements array and rerenders\r\n */\n\n\n this.insertImageElement = async (imageElement, imageFile, showCursorImagePreview) => {\n this.scene.addNewElement(imageElement);\n\n try {\n await this.initializeImage({\n imageFile,\n imageElement,\n showCursorImagePreview\n });\n } catch (error) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(imageElement, {\n isDeleted: true\n });\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n this.setState({\n errorMessage: error.message || (0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.imageInsertError\")\n });\n }\n };\n\n this.setImagePreviewCursor = async imageFile => {\n // mustn't be larger than 128 px\n // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Basic_User_Interface/Using_URL_values_for_the_cursor_property\n const cursorImageSizePx = 96;\n const imagePreview = await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.resizeImageFile)(imageFile, {\n maxWidthOrHeight: cursorImageSizePx\n });\n let previewDataURL = await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.getDataURL)(imagePreview); // SVG cannot be resized via `resizeImageFile` so we resize by rendering to\n // a small canvas\n\n if (imageFile.type === _constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.svg) {\n const img = await (0,_element_image__WEBPACK_IMPORTED_MODULE_40__.loadHTMLImageElement)(previewDataURL);\n let height = Math.min(img.height, cursorImageSizePx);\n let width = height * (img.width / img.height);\n\n if (width > cursorImageSizePx) {\n width = cursorImageSizePx;\n height = width * (img.height / img.width);\n }\n\n const canvas = document.createElement(\"canvas\");\n canvas.height = height;\n canvas.width = width;\n const context = canvas.getContext(\"2d\");\n context.drawImage(img, 0, 0, width, height);\n previewDataURL = canvas.toDataURL(_constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.svg);\n }\n\n if (this.state.pendingImageElementId) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, `url(${previewDataURL}) 4 4, auto`);\n }\n };\n\n this.onImageAction = async ({\n insertOnCanvasDirectly\n } = {\n insertOnCanvasDirectly: false\n }) => {\n try {\n const clientX = this.state.width / 2 + this.state.offsetLeft;\n const clientY = this.state.height / 2 + this.state.offsetTop;\n const {\n x,\n y\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX,\n clientY\n }, this.state);\n const imageFile = await (0,_data_filesystem__WEBPACK_IMPORTED_MODULE_42__.fileOpen)({\n description: \"Image\",\n extensions: Object.keys(_constants__WEBPACK_IMPORTED_MODULE_12__.IMAGE_MIME_TYPES)\n });\n const imageElement = this.createImageElement({\n sceneX: x,\n sceneY: y\n });\n\n if (insertOnCanvasDirectly) {\n this.insertImageElement(imageElement, imageFile);\n this.initializeImageDimensions(imageElement);\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({\n [imageElement.id]: true\n }, this.state)\n }, () => {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n });\n } else {\n this.setState({\n pendingImageElementId: imageElement.id\n }, () => {\n this.insertImageElement(imageElement, imageFile,\n /* showCursorImagePreview */\n true);\n });\n }\n } catch (error) {\n if (error.name !== \"AbortError\") {\n console.error(error);\n } else {\n console.warn(error);\n }\n\n this.setState({\n pendingImageElementId: null,\n editingElement: null,\n activeTool: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, {\n type: \"selection\"\n })\n }, () => {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n });\n }\n };\n\n this.initializeImageDimensions = (imageElement, forceNaturalSize = false) => {\n var _a;\n\n const image = (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isInitializedImageElement)(imageElement) && ((_a = this.imageCache.get(imageElement.fileId)) === null || _a === void 0 ? void 0 : _a.image);\n\n if (!image || image instanceof Promise) {\n if (imageElement.width < _constants__WEBPACK_IMPORTED_MODULE_12__.DRAGGING_THRESHOLD / this.state.zoom.value && imageElement.height < _constants__WEBPACK_IMPORTED_MODULE_12__.DRAGGING_THRESHOLD / this.state.zoom.value) {\n const placeholderSize = 100 / this.state.zoom.value;\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(imageElement, {\n x: imageElement.x - placeholderSize / 2,\n y: imageElement.y - placeholderSize / 2,\n width: placeholderSize,\n height: placeholderSize\n });\n }\n\n return;\n }\n\n if (forceNaturalSize || // if user-created bounding box is below threshold, assume the\n // intention was to click instead of drag, and use the image's\n // intrinsic size\n imageElement.width < _constants__WEBPACK_IMPORTED_MODULE_12__.DRAGGING_THRESHOLD / this.state.zoom.value && imageElement.height < _constants__WEBPACK_IMPORTED_MODULE_12__.DRAGGING_THRESHOLD / this.state.zoom.value) {\n const minHeight = Math.max(this.state.height - 120, 160); // max 65% of canvas height, clamped to <300px, vh - 120px>\n\n const maxHeight = Math.min(minHeight, Math.floor(this.state.height * 0.5) / this.state.zoom.value);\n const height = Math.min(image.naturalHeight, maxHeight);\n const width = height * (image.naturalWidth / image.naturalHeight); // add current imageElement width/height to account for previous centering\n // of the placeholder image\n\n const x = imageElement.x + imageElement.width / 2 - width / 2;\n const y = imageElement.y + imageElement.height / 2 - height / 2;\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(imageElement, {\n x,\n y,\n width,\n height\n });\n }\n };\n /** updates image cache, refreshing updated elements and/or setting status\r\n to error for images that fail during <img> element creation */\n\n\n this.updateImageCache = async (elements, files = this.files) => {\n const {\n updatedFiles,\n erroredFiles\n } = await (0,_element_image__WEBPACK_IMPORTED_MODULE_40__.updateImageCache)({\n imageCache: this.imageCache,\n fileIds: elements.map(element => element.fileId),\n files\n });\n\n if (updatedFiles.size || erroredFiles.size) {\n for (const element of elements) {\n if (updatedFiles.has(element.fileId)) {\n _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_66__.ShapeCache[\"delete\"](element);\n }\n }\n }\n\n if (erroredFiles.size) {\n this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().map(element => {\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isInitializedImageElement)(element) && erroredFiles.has(element.fileId)) {\n return (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith)(element, {\n status: \"error\"\n });\n }\n\n return element;\n }));\n }\n\n return {\n updatedFiles,\n erroredFiles\n };\n };\n /** adds new images to imageCache and re-renders if needed */\n\n\n this.addNewImagesToImageCache = async (imageElements = (0,_element_image__WEBPACK_IMPORTED_MODULE_40__.getInitializedImageElements)(this.scene.getNonDeletedElements()), files = this.files) => {\n const uncachedImageElements = imageElements.filter(element => !element.isDeleted && !this.imageCache.has(element.fileId));\n\n if (uncachedImageElements.length) {\n const {\n updatedFiles\n } = await this.updateImageCache(uncachedImageElements, files);\n\n if (updatedFiles.size) {\n this.scene.informMutation();\n }\n }\n };\n /** generally you should use `addNewImagesToImageCache()` directly if you need\r\n * to render new images. This is just a failsafe */\n\n\n this.scheduleImageRefresh = lodash_throttle__WEBPACK_IMPORTED_MODULE_41___default()(() => {\n this.addNewImagesToImageCache();\n }, _constants__WEBPACK_IMPORTED_MODULE_12__.IMAGE_RENDER_TIMEOUT);\n\n this.updateBindingEnabledOnPointerMove = event => {\n const shouldEnableBinding = (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.shouldEnableBindingForPointerEvent)(event);\n\n if (this.state.isBindingEnabled !== shouldEnableBinding) {\n this.setState({\n isBindingEnabled: shouldEnableBinding\n });\n }\n };\n\n this.maybeSuggestBindingAtCursor = pointerCoords => {\n const hoveredBindableElement = (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.getHoveredElementForBinding)(pointerCoords, this.scene);\n this.setState({\n suggestedBindings: hoveredBindableElement != null ? [hoveredBindableElement] : []\n });\n };\n\n this.maybeSuggestBindingsForLinearElementAtCoords = (linearElement,\n /** scene coords */\n pointerCoords, // During line creation the start binding hasn't been written yet\n // into `linearElement`\n oppositeBindingBoundElement) => {\n if (!pointerCoords.length) {\n return;\n }\n\n const suggestedBindings = pointerCoords.reduce((acc, coords) => {\n const hoveredBindableElement = (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.getHoveredElementForBinding)(coords, this.scene);\n\n if (hoveredBindableElement != null && !(0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.isLinearElementSimpleAndAlreadyBound)(linearElement, oppositeBindingBoundElement === null || oppositeBindingBoundElement === void 0 ? void 0 : oppositeBindingBoundElement.id, hoveredBindableElement)) {\n acc.push(hoveredBindableElement);\n }\n\n return acc;\n }, []);\n this.setState({\n suggestedBindings\n });\n };\n\n this.handleInteractiveCanvasRef = canvas => {\n var _a, _b, _c; // canvas is null when unmounting\n\n\n if (canvas !== null) {\n this.interactiveCanvas = canvas; // -----------------------------------------------------------------------\n // NOTE wheel, touchstart, touchend events must be registered outside\n // of react because react binds them them passively (so we can't prevent\n // default on them)\n\n this.interactiveCanvas.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.WHEEL, this.handleWheel);\n this.interactiveCanvas.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.TOUCH_START, this.onTouchStart);\n this.interactiveCanvas.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.TOUCH_END, this.onTouchEnd); // -----------------------------------------------------------------------\n } else {\n (_a = this.interactiveCanvas) === null || _a === void 0 ? void 0 : _a.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.WHEEL, this.handleWheel);\n (_b = this.interactiveCanvas) === null || _b === void 0 ? void 0 : _b.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.TOUCH_START, this.onTouchStart);\n (_c = this.interactiveCanvas) === null || _c === void 0 ? void 0 : _c.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.TOUCH_END, this.onTouchEnd);\n }\n };\n\n this.handleAppOnDrop = async event => {\n var _a, _b, _c, _d;\n\n if (this.props.onDrop) {\n try {\n if ((await this.props.onDrop(event)) === false) {\n return;\n }\n } catch (e) {\n console.error(e);\n }\n } // must be retrieved first, in the same frame\n\n\n const {\n file,\n fileHandle\n } = await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.getFileFromEvent)(event);\n const {\n x: sceneX,\n y: sceneY\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n\n try {\n if ((0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.isSupportedImageFile)(file)) {\n // first attempt to decode scene from the image if it's embedded\n // ---------------------------------------------------------------------\n if ((file === null || file === void 0 ? void 0 : file.type) === _constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.png || (file === null || file === void 0 ? void 0 : file.type) === _constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.svg) {\n try {\n const scene = await (0,_data__WEBPACK_IMPORTED_MODULE_13__.loadFromBlob)(file, this.state, this.scene.getElementsIncludingDeleted(), fileHandle);\n this.syncActionResult(Object.assign(Object.assign({}, scene), {\n appState: Object.assign(Object.assign({}, scene.appState || this.state), {\n isLoading: false\n }),\n replaceFiles: true,\n commitToHistory: true\n }));\n return;\n } catch (error) {\n if (error.name !== \"EncodingError\") {\n throw error;\n }\n }\n } // if no scene is embedded or we fail for whatever reason, fall back\n // to importing as regular image\n // ---------------------------------------------------------------------\n\n\n const imageElement = this.createImageElement({\n sceneX,\n sceneY\n });\n this.insertImageElement(imageElement, file);\n this.initializeImageDimensions(imageElement);\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({\n [imageElement.id]: true\n }, this.state)\n });\n return;\n }\n } catch (error) {\n return this.setState({\n isLoading: false,\n errorMessage: error.message\n });\n }\n\n const libraryJSON = event.dataTransfer.getData(_constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.excalidrawlib);\n\n if (libraryJSON && typeof libraryJSON === \"string\") {\n try {\n const libraryItems = (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.parseLibraryJSON)(libraryJSON);\n this.addElementsFromPasteOrLibrary({\n elements: (0,_data_library__WEBPACK_IMPORTED_MODULE_14__.distributeLibraryItemsOnSquareGrid)(libraryItems),\n position: event,\n files: null\n });\n } catch (error) {\n this.setState({\n errorMessage: error.message\n });\n }\n\n return;\n }\n\n if (file) {\n // atetmpt to parse an excalidraw/excalidrawlib file\n await this.loadFileToCanvas(file, fileHandle);\n }\n\n if ((_b = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.types) === null || _b === void 0 ? void 0 : _b.includes(\"text/plain\")) {\n const text = (_c = event.dataTransfer) === null || _c === void 0 ? void 0 : _c.getData(\"text\");\n\n if (text && (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.embeddableURLValidator)(text, this.props.validateEmbeddable) && (/^(http|https):\\/\\/[^\\s/$.?#].[^\\s]*$/.test(text) || ((_d = (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.getEmbedLink)(text)) === null || _d === void 0 ? void 0 : _d.type) === \"video\")) {\n const embeddable = this.insertEmbeddableElement({\n sceneX,\n sceneY,\n link: (0,_data_url__WEBPACK_IMPORTED_MODULE_47__.normalizeLink)(text)\n });\n\n if (embeddable) {\n this.setState({\n selectedElementIds: {\n [embeddable.id]: true\n }\n });\n }\n }\n }\n };\n\n this.loadFileToCanvas = async (file, fileHandle) => {\n file = await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.normalizeFile)(file);\n\n try {\n const ret = await (0,_data_blob__WEBPACK_IMPORTED_MODULE_39__.loadSceneOrLibraryFromBlob)(file, this.state, this.scene.getElementsIncludingDeleted(), fileHandle);\n\n if (ret.type === _constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.excalidraw) {\n this.setState({\n isLoading: true\n });\n this.syncActionResult(Object.assign(Object.assign({}, ret.data), {\n appState: Object.assign(Object.assign({}, ret.data.appState || this.state), {\n isLoading: false\n }),\n replaceFiles: true,\n commitToHistory: true\n }));\n } else if (ret.type === _constants__WEBPACK_IMPORTED_MODULE_12__.MIME_TYPES.excalidrawlib) {\n await this.library.updateLibrary({\n libraryItems: file,\n merge: true,\n openLibraryMenu: true\n }).catch(error => {\n console.error(error);\n this.setState({\n errorMessage: (0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"errors.importLibraryError\")\n });\n });\n }\n } catch (error) {\n this.setState({\n isLoading: false,\n errorMessage: error.message\n });\n }\n };\n\n this.handleCanvasContextMenu = event => {\n event.preventDefault();\n\n if ((\"pointerType\" in event.nativeEvent && event.nativeEvent.pointerType === \"touch\" || \"pointerType\" in event.nativeEvent && event.nativeEvent.pointerType === \"pen\" && // always allow if user uses a pen secondary button\n event.button !== _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_BUTTON.SECONDARY) && this.state.activeTool.type !== \"selection\") {\n return;\n }\n\n const {\n x,\n y\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n const element = this.getElementAtPosition(x, y, {\n preferSelected: true,\n includeLockedElements: true\n });\n const selectedElements = this.scene.getSelectedElements(this.state);\n const isHittignCommonBoundBox = this.isHittingCommonBoundingBoxOfSelectedElements({\n x,\n y\n }, selectedElements);\n const type = element || isHittignCommonBoundBox ? \"element\" : \"canvas\";\n const container = this.excalidrawContainerRef.current;\n const {\n top: offsetTop,\n left: offsetLeft\n } = container.getBoundingClientRect();\n const left = event.clientX - offsetLeft;\n const top = event.clientY - offsetTop;\n (0,_analytics__WEBPACK_IMPORTED_MODULE_9__.trackEvent)(\"contextMenu\", \"openContextMenu\", type);\n this.setState(Object.assign(Object.assign({}, element && !this.state.selectedElementIds[element.id] ? Object.assign(Object.assign(Object.assign({}, this.state), (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: this.state.editingGroupId,\n selectedElementIds: {\n [element.id]: true\n }\n }, this.scene.getNonDeletedElements(), this.state, this)), {\n selectedLinearElement: (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(element) ? new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(element, this.scene) : null\n }) : this.state), {\n showHyperlinkPopup: false\n }), () => {\n this.setState({\n contextMenu: {\n top,\n left,\n items: this.getContextMenuItems(type)\n }\n });\n });\n };\n\n this.maybeDragNewGenericElement = (pointerDownState, event) => {\n var _a, _b, _c, _d, _e;\n\n const draggingElement = this.state.draggingElement;\n const pointerCoords = pointerDownState.lastCoords;\n\n if (!draggingElement) {\n return;\n }\n\n if (draggingElement.type === \"selection\" && this.state.activeTool.type !== \"eraser\") {\n (0,_element__WEBPACK_IMPORTED_MODULE_16__.dragNewElement)(draggingElement, this.state.activeTool.type, pointerDownState.origin.x, pointerDownState.origin.y, pointerCoords.x, pointerCoords.y, (0,_utils__WEBPACK_IMPORTED_MODULE_33__.distance)(pointerDownState.origin.x, pointerCoords.x), (0,_utils__WEBPACK_IMPORTED_MODULE_33__.distance)(pointerDownState.origin.y, pointerCoords.y), (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldMaintainAspectRatio)(event), (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldResizeFromCenter)(event));\n } else {\n let [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerCoords.x, pointerCoords.y, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize);\n const image = (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isInitializedImageElement)(draggingElement) && ((_a = this.imageCache.get(draggingElement.fileId)) === null || _a === void 0 ? void 0 : _a.image);\n const aspectRatio = image && !(image instanceof Promise) ? image.width / image.height : null;\n this.maybeCacheReferenceSnapPoints(event, [draggingElement]);\n const {\n snapOffset,\n snapLines\n } = (0,_snapping__WEBPACK_IMPORTED_MODULE_58__.snapNewElement)(draggingElement, this.state, event, {\n x: pointerDownState.originInGrid.x + ((_c = (_b = this.state.originSnapOffset) === null || _b === void 0 ? void 0 : _b.x) !== null && _c !== void 0 ? _c : 0),\n y: pointerDownState.originInGrid.y + ((_e = (_d = this.state.originSnapOffset) === null || _d === void 0 ? void 0 : _d.y) !== null && _e !== void 0 ? _e : 0)\n }, {\n x: gridX - pointerDownState.originInGrid.x,\n y: gridY - pointerDownState.originInGrid.y\n });\n gridX += snapOffset.x;\n gridY += snapOffset.y;\n this.setState({\n snapLines\n });\n (0,_element__WEBPACK_IMPORTED_MODULE_16__.dragNewElement)(draggingElement, this.state.activeTool.type, pointerDownState.originInGrid.x, pointerDownState.originInGrid.y, gridX, gridY, (0,_utils__WEBPACK_IMPORTED_MODULE_33__.distance)(pointerDownState.originInGrid.x, gridX), (0,_utils__WEBPACK_IMPORTED_MODULE_33__.distance)(pointerDownState.originInGrid.y, gridY), (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isImageElement)(draggingElement) ? !(0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldMaintainAspectRatio)(event) : (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldMaintainAspectRatio)(event), (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldResizeFromCenter)(event), aspectRatio, this.state.originSnapOffset);\n this.maybeSuggestBindingForAll([draggingElement]); // highlight elements that are to be added to frames on frames creation\n\n if (this.state.activeTool.type === \"frame\") {\n this.setState({\n elementsToHighlight: (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getElementsInResizingFrame)(this.scene.getNonDeletedElements(), draggingElement, this.state)\n });\n }\n }\n };\n\n this.maybeHandleResize = (pointerDownState, event) => {\n const selectedElements = this.scene.getSelectedElements(this.state);\n const selectedFrames = selectedElements.filter(element => element.type === \"frame\");\n const transformHandleType = pointerDownState.resize.handleType;\n\n if (selectedFrames.length > 0 && transformHandleType === \"rotation\") {\n return false;\n }\n\n this.setState({\n // TODO: rename this state field to \"isScaling\" to distinguish\n // it from the generic \"isResizing\" which includes scaling and\n // rotating\n isResizing: transformHandleType && transformHandleType !== \"rotation\",\n isRotating: transformHandleType === \"rotation\",\n activeEmbeddable: null\n });\n const pointerCoords = pointerDownState.lastCoords;\n let [resizeX, resizeY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerCoords.x - pointerDownState.resize.offset.x, pointerCoords.y - pointerDownState.resize.offset.y, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize);\n const frameElementsOffsetsMap = new Map();\n selectedFrames.forEach(frame => {\n const elementsInFrame = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getFrameElements)(this.scene.getNonDeletedElements(), frame.id);\n elementsInFrame.forEach(element => {\n frameElementsOffsetsMap.set(frame.id + element.id, {\n x: element.x - frame.x,\n y: element.y - frame.y\n });\n });\n }); // check needed for avoiding flickering when a key gets pressed\n // during dragging\n\n if (!this.state.selectedElementsAreBeingDragged) {\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerCoords.x, pointerCoords.y, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize);\n const dragOffset = {\n x: gridX - pointerDownState.originInGrid.x,\n y: gridY - pointerDownState.originInGrid.y\n };\n const originalElements = [...pointerDownState.originalElements.values()];\n this.maybeCacheReferenceSnapPoints(event, selectedElements);\n const {\n snapOffset,\n snapLines\n } = (0,_snapping__WEBPACK_IMPORTED_MODULE_58__.snapResizingElements)(selectedElements, (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getSelectedElements)(originalElements, this.state), this.state, event, dragOffset, transformHandleType);\n resizeX += snapOffset.x;\n resizeY += snapOffset.y;\n this.setState({\n snapLines\n });\n }\n\n if ((0,_element__WEBPACK_IMPORTED_MODULE_16__.transformElements)(pointerDownState, transformHandleType, selectedElements, pointerDownState.resize.arrowDirection, (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldRotateWithDiscreteAngle)(event), (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldResizeFromCenter)(event), selectedElements.length === 1 && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isImageElement)(selectedElements[0]) ? !(0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldMaintainAspectRatio)(event) : (0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldMaintainAspectRatio)(event), resizeX, resizeY, pointerDownState.resize.center.x, pointerDownState.resize.center.y, this.state)) {\n this.maybeSuggestBindingForAll(selectedElements);\n const elementsToHighlight = new Set();\n selectedFrames.forEach(frame => {\n const elementsInFrame = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getFrameElements)(this.scene.getNonDeletedElements(), frame.id); // keep elements' positions relative to their frames on frames resizing\n\n if (transformHandleType) {\n if (transformHandleType.includes(\"w\")) {\n elementsInFrame.forEach(element => {\n var _a, _b;\n\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n x: frame.x + (((_a = frameElementsOffsetsMap.get(frame.id + element.id)) === null || _a === void 0 ? void 0 : _a.x) || 0),\n y: frame.y + (((_b = frameElementsOffsetsMap.get(frame.id + element.id)) === null || _b === void 0 ? void 0 : _b.y) || 0)\n });\n });\n }\n\n if (transformHandleType.includes(\"n\")) {\n elementsInFrame.forEach(element => {\n var _a, _b;\n\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n x: frame.x + (((_a = frameElementsOffsetsMap.get(frame.id + element.id)) === null || _a === void 0 ? void 0 : _a.x) || 0),\n y: frame.y + (((_b = frameElementsOffsetsMap.get(frame.id + element.id)) === null || _b === void 0 ? void 0 : _b.y) || 0)\n });\n });\n }\n }\n\n (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getElementsInResizingFrame)(this.scene.getNonDeletedElements(), frame, this.state).forEach(element => elementsToHighlight.add(element));\n });\n this.setState({\n elementsToHighlight: [...elementsToHighlight]\n });\n return true;\n }\n\n return false;\n };\n\n this.getContextMenuItems = type => {\n const options = [];\n options.push(_actions__WEBPACK_IMPORTED_MODULE_5__.actionCopyAsPng, _actions__WEBPACK_IMPORTED_MODULE_5__.actionCopyAsSvg); // canvas contextMenu\n // -------------------------------------------------------------------------\n\n if (type === \"canvas\") {\n if (this.state.viewModeEnabled) {\n return [...options, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleGridMode, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleZenMode, _actions_actionToggleViewMode__WEBPACK_IMPORTED_MODULE_38__.actionToggleViewMode, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleStats, _actions_actionCanvas__WEBPACK_IMPORTED_MODULE_55__.actionToggleLaserPointer];\n }\n\n return [_actions_actionClipboard__WEBPACK_IMPORTED_MODULE_53__.actionPaste, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionCopyAsPng, _actions__WEBPACK_IMPORTED_MODULE_5__.actionCopyAsSvg, _actions__WEBPACK_IMPORTED_MODULE_5__.copyText, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionSelectAll, _actions_actionElementLock__WEBPACK_IMPORTED_MODULE_49__.actionUnlockAllElements, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleGridMode, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleObjectsSnapMode, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleZenMode, _actions_actionToggleViewMode__WEBPACK_IMPORTED_MODULE_38__.actionToggleViewMode, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleStats];\n } // element contextMenu\n // -------------------------------------------------------------------------\n\n\n options.push(_actions__WEBPACK_IMPORTED_MODULE_5__.copyText);\n\n if (this.state.viewModeEnabled) {\n return [_actions__WEBPACK_IMPORTED_MODULE_5__.actionCopy, ...options];\n }\n\n return [_actions__WEBPACK_IMPORTED_MODULE_5__.actionCut, _actions__WEBPACK_IMPORTED_MODULE_5__.actionCopy, _actions_actionClipboard__WEBPACK_IMPORTED_MODULE_53__.actionPaste, _actions_actionFrame__WEBPACK_IMPORTED_MODULE_54__.actionSelectAllElementsInFrame, _actions_actionFrame__WEBPACK_IMPORTED_MODULE_54__.actionRemoveAllElementsFromFrame, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, ...options, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionCopyStyles, _actions__WEBPACK_IMPORTED_MODULE_5__.actionPasteStyles, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionGroup, _actions__WEBPACK_IMPORTED_MODULE_5__.actionUnbindText, _actions__WEBPACK_IMPORTED_MODULE_5__.actionBindText, _actions_actionBoundText__WEBPACK_IMPORTED_MODULE_59__.actionWrapTextInContainer, _actions__WEBPACK_IMPORTED_MODULE_5__.actionUngroup, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionAddToLibrary, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionSendBackward, _actions__WEBPACK_IMPORTED_MODULE_5__.actionBringForward, _actions__WEBPACK_IMPORTED_MODULE_5__.actionSendToBack, _actions__WEBPACK_IMPORTED_MODULE_5__.actionBringToFront, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionFlipHorizontal, _actions__WEBPACK_IMPORTED_MODULE_5__.actionFlipVertical, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleLinearEditor, _actions__WEBPACK_IMPORTED_MODULE_5__.actionLink, _actions__WEBPACK_IMPORTED_MODULE_5__.actionDuplicateSelection, _actions__WEBPACK_IMPORTED_MODULE_5__.actionToggleElementLock, _ContextMenu__WEBPACK_IMPORTED_MODULE_35__.CONTEXT_MENU_SEPARATOR, _actions__WEBPACK_IMPORTED_MODULE_5__.actionDeleteSelected];\n };\n\n this.handleWheel = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n event.preventDefault();\n\n if (isPanning) {\n return;\n }\n\n const {\n deltaX,\n deltaY\n } = event; // note that event.ctrlKey is necessary to handle pinch zooming\n\n if ( //zsviczian\n (event.metaKey || event.ctrlKey) && !this.state.allowWheelZoom || !(event.metaKey || event.ctrlKey) && this.state.allowWheelZoom) {\n const sign = Math.sign(deltaY);\n const MAX_STEP = _constants__WEBPACK_IMPORTED_MODULE_12__.ZOOM_STEP * 100;\n const absDelta = Math.abs(deltaY);\n let delta = deltaY;\n\n if (absDelta > MAX_STEP) {\n delta = MAX_STEP * sign;\n }\n\n let newZoom = this.state.zoom.value - delta / 100; // increase zoom steps the more zoomed-in we are (applies to >100% only)\n\n newZoom += Math.log10(Math.max(1, this.state.zoom.value)) * -sign * // reduced amplification for small deltas (small movements on a trackpad)\n Math.min(1, absDelta / 20);\n this.translateCanvas(state => Object.assign(Object.assign({}, (0,_scene_zoom__WEBPACK_IMPORTED_MODULE_31__.getStateForZoom)({\n viewportX: this.lastViewportPosition.x,\n viewportY: this.lastViewportPosition.y,\n nextZoom: (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getNormalizedZoom)(newZoom)\n }, state)), {\n shouldCacheIgnoreZoom: true\n }));\n this.resetShouldCacheIgnoreZoomDebounced();\n return;\n } // scroll horizontally when shift pressed\n\n\n if (event.shiftKey) {\n this.translateCanvas(({\n zoom,\n scrollX\n }) => ({\n // on Mac, shift+wheel tends to result in deltaX\n scrollX: scrollX - (deltaY || deltaX) / zoom.value\n }));\n return;\n }\n\n this.translateCanvas(({\n zoom,\n scrollX,\n scrollY\n }) => ({\n scrollX: scrollX - deltaX / zoom.value,\n scrollY: scrollY - deltaY / zoom.value\n }));\n });\n\n this.savePointer = (x, y, button) => {\n var _a, _b;\n\n if (!x || !y) {\n return;\n }\n\n const {\n x: sceneX,\n y: sceneY\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: x,\n clientY: y\n }, this.state);\n\n if (isNaN(sceneX) || isNaN(sceneY)) {// sometimes the pointer goes off screen\n }\n\n const pointer = {\n x: sceneX,\n y: sceneY,\n tool: this.state.activeTool.type === \"laser\" ? \"laser\" : \"pointer\"\n };\n (_b = (_a = this.props).onPointerUpdate) === null || _b === void 0 ? void 0 : _b.call(_a, {\n pointer,\n button,\n pointersMap: gesture.pointers\n });\n };\n\n this.resetShouldCacheIgnoreZoomDebounced = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.debounce)(() => {\n if (!this.unmounted) {\n this.setState({\n shouldCacheIgnoreZoom: false\n });\n }\n }, 300);\n\n this.updateDOMRect = cb => {\n var _a;\n\n if ((_a = this.excalidrawContainerRef) === null || _a === void 0 ? void 0 : _a.current) {\n const excalidrawContainer = this.excalidrawContainerRef.current;\n const {\n width,\n height,\n left: offsetLeft,\n top: offsetTop\n } = excalidrawContainer.getBoundingClientRect();\n const {\n width: currentWidth,\n height: currentHeight,\n offsetTop: currentOffsetTop,\n offsetLeft: currentOffsetLeft\n } = this.state;\n\n if (width === currentWidth && height === currentHeight && offsetLeft === currentOffsetLeft && offsetTop === currentOffsetTop) {\n if (cb) {\n cb();\n }\n\n return;\n } //zsviczian\n\n\n if (width === 0 || height === 0) {\n if (cb) {\n cb();\n }\n\n return;\n }\n\n this.setState({\n width,\n height,\n offsetLeft,\n offsetTop\n }, () => {\n cb && cb();\n });\n }\n };\n\n this.refresh = () => {\n this.setState(Object.assign({}, this.getCanvasOffsets()));\n };\n\n const defaultAppState = (0,_appState__WEBPACK_IMPORTED_MODULE_10__.getDefaultAppState)();\n const {\n excalidrawRef,\n viewModeEnabled = false,\n zenModeEnabled = false,\n gridModeEnabled = false,\n objectsSnapModeEnabled = false,\n theme = defaultAppState.theme,\n name = defaultAppState.name,\n initState //zsviczian\n\n } = props;\n this.state = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, defaultAppState), {\n theme,\n isLoading: true\n }), this.getCanvasOffsets()), {\n viewModeEnabled,\n zenModeEnabled,\n objectsSnapModeEnabled,\n gridSize: gridModeEnabled ? _constants__WEBPACK_IMPORTED_MODULE_12__.GRID_SIZE : null,\n name,\n width: window.innerWidth,\n height: window.innerHeight\n }), initState !== null && initState !== void 0 ? initState : {});\n this.id = (0,nanoid__WEBPACK_IMPORTED_MODULE_70__.nanoid)();\n this.library = new _data_library__WEBPACK_IMPORTED_MODULE_14__[\"default\"](this);\n this.scene = new _scene_Scene__WEBPACK_IMPORTED_MODULE_30__[\"default\"]();\n this.canvas = document.createElement(\"canvas\");\n this.rc = roughjs_bin_rough__WEBPACK_IMPORTED_MODULE_3__[\"default\"].canvas(this.canvas);\n this.renderer = new _scene_Renderer__WEBPACK_IMPORTED_MODULE_65__.Renderer(this.scene);\n\n if (excalidrawRef) {\n const readyPromise = \"current\" in excalidrawRef && ((_a = excalidrawRef.current) === null || _a === void 0 ? void 0 : _a.readyPromise) || (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resolvablePromise)();\n const api = {\n ready: true,\n readyPromise,\n updateScene: this.updateScene,\n updateLibrary: this.library.updateLibrary,\n addFiles: this.addFiles,\n resetScene: this.resetScene,\n getSceneElementsIncludingDeleted: this.getSceneElementsIncludingDeleted,\n history: {\n clear: this.resetHistory\n },\n scrollToContent: this.scrollToContent,\n zoomToFit: this.zoomToFit,\n startLineEditor: this.startLineEditor,\n getSceneElements: this.getSceneElements,\n getAppState: () => this.state,\n getFiles: () => this.files,\n refresh: this.refresh,\n setToast: this.setToast,\n updateContainerSize: this.updateContainerSize,\n id: this.id,\n setLocalFont: this.setLocalFont,\n selectElements: this.selectElements,\n sendBackward: this.sendBackward,\n bringForward: this.bringForward,\n sendToBack: this.sendToBack,\n bringToFront: this.bringToFront,\n setMobileModeAllowed: this.setMobileModeAllowed,\n setActiveTool: this.setActiveTool,\n setCursor: this.setCursor,\n resetCursor: this.resetCursor,\n updateFrameRendering: this.updateFrameRendering,\n toggleSidebar: this.toggleSidebar,\n getHTMLIFrameElement: id => this.getHTMLIFrameElement(id) //zsviczian\n\n };\n\n if (typeof excalidrawRef === \"function\") {\n excalidrawRef(api);\n } else {\n excalidrawRef.current = api;\n }\n\n readyPromise.resolve(api);\n }\n\n this.excalidrawContainerValue = {\n container: this.excalidrawContainerRef.current,\n id: this.id\n };\n this.fonts = new _scene_Fonts__WEBPACK_IMPORTED_MODULE_50__.Fonts({\n scene: this.scene,\n onSceneUpdated: this.onSceneUpdated\n });\n this.history = new _history__WEBPACK_IMPORTED_MODULE_24__[\"default\"]();\n this.actionManager = new _actions_manager__WEBPACK_IMPORTED_MODULE_7__.ActionManager(this.syncActionResult, () => this.state, () => this.scene.getElementsIncludingDeleted(), this);\n this.actionManager.registerAll(_actions_register__WEBPACK_IMPORTED_MODULE_8__.actions);\n this.actionManager.registerAction((0,_actions_actionHistory__WEBPACK_IMPORTED_MODULE_6__.createUndoAction)(this.history));\n this.actionManager.registerAction((0,_actions_actionHistory__WEBPACK_IMPORTED_MODULE_6__.createRedoAction)(this.history));\n }\n\n onWindowMessage(event) {\n if (event.origin !== \"https://player.vimeo.com\" && event.origin !== \"https://www.youtube.com\") {\n return;\n }\n\n let data = null;\n\n try {\n data = JSON.parse(event.data);\n } catch (e) {}\n\n if (!data) {\n return;\n }\n\n switch (event.origin) {\n case \"https://player.vimeo.com\":\n //Allowing for multiple instances of Excalidraw running in the window\n if (data.method === \"paused\") {\n let source = null;\n const iframes = document.body.querySelectorAll(\"iframe.excalidraw__embeddable\");\n\n if (!iframes) {\n break;\n }\n\n for (const iframe of iframes) {\n if (iframe.contentWindow === event.source) {\n source = iframe.contentWindow;\n }\n }\n\n source === null || source === void 0 ? void 0 : source.postMessage(JSON.stringify({\n method: data.value ? \"play\" : \"pause\",\n value: true\n }), \"*\");\n }\n\n break;\n\n case \"https://www.youtube.com\":\n if (data.event === \"infoDelivery\" && data.info && data.id && typeof data.info.playerState === \"number\") {\n const id = data.id;\n const playerState = data.info.playerState;\n\n if (Object.values(_constants__WEBPACK_IMPORTED_MODULE_12__.YOUTUBE_STATES).includes(playerState)) {\n YOUTUBE_VIDEO_STATES.set(id, playerState);\n }\n }\n\n break;\n }\n }\n\n updateEmbeddableRef(id, ref) {\n if (ref) {\n this.iFrameRefs.set(id, ref);\n }\n }\n\n getHTMLIFrameElement(id) {\n return this.iFrameRefs.get(id);\n }\n\n handleEmbeddableCenterClick(element) {\n var _a, _b, _c, _d;\n\n if (((_a = this.state.activeEmbeddable) === null || _a === void 0 ? void 0 : _a.element) === element && ((_b = this.state.activeEmbeddable) === null || _b === void 0 ? void 0 : _b.state) === \"active\") {\n return;\n } // The delay serves two purposes\n // 1. To prevent first click propagating to iframe on mobile,\n // else the click will immediately start and stop the video\n // 2. If the user double clicks the frame center to activate it\n // without the delay youtube will immediately open the video\n // in fullscreen mode\n\n\n setTimeout(() => {\n this.setState({\n activeEmbeddable: {\n element,\n state: \"active\"\n },\n selectedElementIds: {\n [element.id]: true\n },\n draggingElement: null,\n selectionElement: null\n });\n }, 100);\n const iframe = this.getHTMLIFrameElement(element.id);\n\n if (!(iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow)) {\n return;\n }\n\n if (iframe.src.includes(\"youtube\")) {\n const state = YOUTUBE_VIDEO_STATES.get(element.id);\n\n if (!state) {\n YOUTUBE_VIDEO_STATES.set(element.id, _constants__WEBPACK_IMPORTED_MODULE_12__.YOUTUBE_STATES.UNSTARTED);\n iframe.contentWindow.postMessage(JSON.stringify({\n event: \"listening\",\n id: element.id\n }), \"*\");\n }\n\n switch (state) {\n case _constants__WEBPACK_IMPORTED_MODULE_12__.YOUTUBE_STATES.PLAYING:\n case _constants__WEBPACK_IMPORTED_MODULE_12__.YOUTUBE_STATES.BUFFERING:\n (_c = iframe.contentWindow) === null || _c === void 0 ? void 0 : _c.postMessage(JSON.stringify({\n event: \"command\",\n func: \"pauseVideo\",\n args: \"\"\n }), \"*\");\n break;\n\n default:\n (_d = iframe.contentWindow) === null || _d === void 0 ? void 0 : _d.postMessage(JSON.stringify({\n event: \"command\",\n func: \"playVideo\",\n args: \"\"\n }), \"*\");\n }\n }\n\n if (iframe.src.includes(\"player.vimeo.com\")) {\n iframe.contentWindow.postMessage(JSON.stringify({\n method: \"paused\" //video play/pause in onWindowMessage handler\n\n }), \"*\");\n }\n }\n\n isEmbeddableCenter(el, event, sceneX, sceneY) {\n var _a, _b;\n\n return el && !event.altKey && !event.shiftKey && !event.metaKey && !event.ctrlKey && (((_a = this.state.activeEmbeddable) === null || _a === void 0 ? void 0 : _a.element) !== el || ((_b = this.state.activeEmbeddable) === null || _b === void 0 ? void 0 : _b.state) === \"hover\" || !this.state.activeEmbeddable) && sceneX >= el.x + el.width / 3 && sceneX <= el.x + 2 * el.width / 3 && sceneY >= el.y + el.height / 3 && sceneY <= el.y + 2 * el.height / 3;\n }\n\n renderEmbeddables() {\n const scale = this.state.zoom.value;\n const normalizedWidth = this.state.width;\n const normalizedHeight = this.state.height;\n const embeddableElements = this.scene.getNonDeletedElements().filter(el => (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(el) && !!el.validated);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: embeddableElements.map(el => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n\n const {\n x,\n y\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.sceneCoordsToViewportCoords)({\n sceneX: el.x,\n sceneY: el.y\n }, this.state);\n const embedLink = (0,_element_embeddable__WEBPACK_IMPORTED_MODULE_34__.getEmbedLink)((0,_data_url__WEBPACK_IMPORTED_MODULE_47__.toValidURL)(el.link || \"\"));\n const isVisible = (0,_element_sizeHelpers__WEBPACK_IMPORTED_MODULE_27__.isElementInViewport)(el, normalizedWidth, normalizedHeight, this.state);\n const isActive = ((_a = this.state.activeEmbeddable) === null || _a === void 0 ? void 0 : _a.element) === el && ((_b = this.state.activeEmbeddable) === null || _b === void 0 ? void 0 : _b.state) === \"active\";\n const isHovered = ((_c = this.state.activeEmbeddable) === null || _c === void 0 ? void 0 : _c.element) === el && ((_d = this.state.activeEmbeddable) === null || _d === void 0 ? void 0 : _d.state) === \"hover\";\n const isWebview = //zsviczian\n this.props.renderWebview && (embedLink === null || embedLink === void 0 ? void 0 : embedLink.type) !== \"document\" && !((_f = (_e = embedLink === null || embedLink === void 0 ? void 0 : embedLink.link) === null || _e === void 0 ? void 0 : _e.startsWith) === null || _f === void 0 ? void 0 : _f.call(_e, \"https://player.vimeo.com\"));\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(\"excalidraw__embeddable-container\", {\n \"is-hovered\": isHovered\n }),\n style: {\n transform: isVisible ? `translate(${x - this.state.offsetLeft}px, ${y - this.state.offsetTop}px) scale(${scale})` : \"none\",\n display: isVisible ? \"block\" : \"none\",\n opacity: el.opacity / 100,\n [\"--embeddable-radius\"]: `${(0,_math__WEBPACK_IMPORTED_MODULE_28__.getCornerRadius)(Math.min(el.width, el.height), el)}px`\n }\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n //this is a hack that addresses isse with embedded excalidraw.com embeddable\n //https://github.com/excalidraw/excalidraw/pull/6691#issuecomment-1607383938\n\n /*ref={(ref) => {\r\n if (!this.excalidrawContainerRef.current) {\r\n return;\r\n }\r\n const container = this.excalidrawContainerRef.current;\r\n const sh = container.scrollHeight;\r\n const ch = container.clientHeight;\r\n if (sh !== ch) {\r\n container.style.height = `${sh}px`;\r\n setTimeout(() => {\r\n container.style.height = `100%`;\r\n });\r\n }\r\n }}*/\n className: \"excalidraw__embeddable-container__inner\",\n style: {\n width: isVisible ? `${el.width}px` : 0,\n height: isVisible ? `${el.height}px` : 0,\n transform: isVisible ? `rotate(${el.angle}rad)` : \"none\",\n pointerEvents: isActive ? _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_EVENTS.enabled : _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_EVENTS.disabled\n }\n }, {\n children: [isHovered && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"excalidraw__embeddable-hint\"\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"buttons.embeddableInteractionButton\")\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"excalidraw__embeddable__outer\",\n style: {\n padding: `${el.strokeWidth}px`\n }\n }, {\n children: (_j = (_h = (_g = this.props).renderEmbeddable) === null || _h === void 0 ? void 0 : _h.call(_g, el, this.state)) !== null && _j !== void 0 ? _j : isWebview ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"webview\", {\n ref: ref => this.updateEmbeddableRef(el.id, ref),\n className: \"excalidraw__embeddable\",\n src: (_k = embedLink === null || embedLink === void 0 ? void 0 : embedLink.link) !== null && _k !== void 0 ? _k : \"\",\n title: \"Excalidraw Embedded Content\",\n allowFullScreen: true\n }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"iframe\", {\n ref: ref => this.updateEmbeddableRef(el.id, ref),\n className: \"excalidraw__embeddable\",\n srcDoc: (embedLink === null || embedLink === void 0 ? void 0 : embedLink.type) === \"document\" ? embedLink.srcdoc(this.state.theme) : undefined,\n src: (embedLink === null || embedLink === void 0 ? void 0 : embedLink.type) !== \"document\" ? (_l = embedLink === null || embedLink === void 0 ? void 0 : embedLink.link) !== null && _l !== void 0 ? _l : \"\" : undefined,\n // https://stackoverflow.com/q/18470015\n scrolling: \"no\",\n referrerPolicy: \"no-referrer-when-downgrade\",\n title: \"Excalidraw Embedded Content\",\n allow: \"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\",\n allowFullScreen: true,\n sandbox: \"allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads\"\n })\n }))]\n }))\n }), el.id);\n })\n });\n }\n\n render() {\n var _a, _b, _c, _d, _e, _f;\n\n const selectedElements = this.scene.getSelectedElements(this.state);\n const {\n renderTopRightUI,\n renderCustomStats\n } = this.props;\n const versionNonce = this.scene.getVersionNonce();\n const {\n canvasElements,\n visibleElements\n } = this.renderer.getRenderableElements({\n versionNonce,\n zoom: this.state.zoom,\n offsetLeft: this.state.offsetLeft,\n offsetTop: this.state.offsetTop,\n scrollX: this.state.scrollX,\n scrollY: this.state.scrollY,\n height: this.state.height,\n width: this.state.width,\n editingElement: this.state.editingElement,\n pendingImageElementId: this.state.pendingImageElementId\n });\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(\"excalidraw excalidraw-container\", {\n \"excalidraw--view-mode\": this.state.viewModeEnabled,\n \"excalidraw--mobile\": this.device.isMobile || !(this.state.viewModeEnabled || this.state.zenModeEnabled) && this.state.trayModeEnabled //zsviczian\n\n }),\n style: {\n [\"--ui-pointerEvents\"]: this.state.selectionElement || this.state.draggingElement || this.state.resizingElement || this.state.editingElement && !(0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(this.state.editingElement) ? _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_EVENTS.disabled : _constants__WEBPACK_IMPORTED_MODULE_12__.POINTER_EVENTS.enabled\n },\n ref: this.excalidrawContainerRef,\n onDrop: this.handleAppOnDrop,\n tabIndex: 0,\n onKeyDown: this.props.handleKeyboardGlobally ? undefined : this.onKeyDown\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AppContext.Provider, Object.assign({\n value: this\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AppPropsContext.Provider, Object.assign({\n value: this.props\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ExcalidrawContainerContext.Provider, Object.assign({\n value: this.excalidrawContainerValue\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(DeviceContext.Provider, Object.assign({\n value: this.device\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ExcalidrawSetAppStateContext.Provider, Object.assign({\n value: this.setAppState\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ExcalidrawAppStateContext.Provider, Object.assign({\n value: this.state\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ExcalidrawElementsContext.Provider, Object.assign({\n value: this.scene.getNonDeletedElements()\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ExcalidrawActionManagerContext.Provider, Object.assign({\n value: this.actionManager\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_LayerUI__WEBPACK_IMPORTED_MODULE_36__[\"default\"], Object.assign({\n canvas: this.canvas,\n interactiveCanvas: this.interactiveCanvas,\n appState: this.state,\n files: this.files,\n setAppState: this.setAppState,\n actionManager: this.actionManager,\n elements: this.scene.getNonDeletedElements(),\n onLockToggle: this.toggleLock,\n onPenModeToggle: this.togglePenMode,\n onHandToolToggle: this.onHandToolToggle,\n langCode: (0,_i18n__WEBPACK_IMPORTED_MODULE_25__.getLanguage)().code,\n renderTopRightUI: renderTopRightUI,\n renderCustomStats: renderCustomStats,\n showExitZenModeBtn: typeof ((_a = this.props) === null || _a === void 0 ? void 0 : _a.zenModeEnabled) === \"undefined\" && this.state.zenModeEnabled,\n UIOptions: this.props.UIOptions,\n onImageAction: this.onImageAction,\n onExportImage: this.onExportImage,\n renderWelcomeScreen: !this.state.isLoading && this.state.showWelcomeScreen && this.state.activeTool.type === \"selection\" && !this.state.zenModeEnabled && !this.scene.getElementsIncludingDeleted().length,\n app: this,\n isCollaborating: this.props.isCollaborating\n }, {\n children: [this.props.children, this.props.renderMermaid && this.state.activeTool.type === \"mermaid\" && //zsviczian\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MermaidToExcalidraw__WEBPACK_IMPORTED_MODULE_67__[\"default\"], {\n selectedElements: this.scene.getSelectedElements(this.state)\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"excalidraw-textEditorContainer\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"excalidraw-contextMenuContainer\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"excalidraw-eye-dropper-container\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_LaserTool_LaserTool__WEBPACK_IMPORTED_MODULE_68__.LaserToolOverlay, {\n manager: this.laserPathManager\n }), selectedElements.length === 1 && !this.state.contextMenu && this.state.showHyperlinkPopup && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_element_Hyperlink__WEBPACK_IMPORTED_MODULE_46__.Hyperlink, {\n element: selectedElements[0],\n setAppState: this.setAppState,\n onLinkOpen: this.props.onLinkOpen,\n setToast: this.setToast\n }, selectedElements[0].id), this.state.toast !== null && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Toast__WEBPACK_IMPORTED_MODULE_37__.Toast, {\n message: this.state.toast.message,\n onClose: () => this.setToast(null),\n duration: this.state.toast.duration,\n closable: this.state.toast.closable\n }), this.state.contextMenu && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ContextMenu__WEBPACK_IMPORTED_MODULE_35__.ContextMenu, {\n items: this.state.contextMenu.items,\n top: this.state.contextMenu.top,\n left: this.state.contextMenu.left,\n actionManager: this.actionManager\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_canvases__WEBPACK_IMPORTED_MODULE_64__.StaticCanvas, {\n canvas: this.canvas,\n rc: this.rc,\n elements: canvasElements,\n visibleElements: visibleElements,\n versionNonce: versionNonce,\n selectionNonce: (_b = this.state.selectionElement) === null || _b === void 0 ? void 0 : _b.versionNonce,\n scale: window.devicePixelRatio,\n appState: this.state,\n renderConfig: {\n imageCache: this.imageCache,\n isExporting: false,\n renderGrid: true\n }\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_canvases__WEBPACK_IMPORTED_MODULE_64__.InteractiveCanvas, {\n containerRef: this.excalidrawContainerRef,\n canvas: this.interactiveCanvas,\n elements: canvasElements,\n visibleElements: visibleElements,\n selectedElements: selectedElements,\n versionNonce: versionNonce,\n selectionNonce: (_c = this.state.selectionElement) === null || _c === void 0 ? void 0 : _c.versionNonce,\n scale: window.devicePixelRatio,\n appState: this.state,\n renderInteractiveSceneCallback: this.renderInteractiveSceneCallback,\n handleCanvasRef: this.handleInteractiveCanvasRef,\n onContextMenu: this.handleCanvasContextMenu,\n onPointerMove: this.handleCanvasPointerMove,\n onPointerUp: this.handleCanvasPointerUp,\n onPointerCancel: this.removePointer,\n onTouchMove: this.handleTouchMove,\n onPointerDown: this.handleCanvasPointerDown,\n onDoubleClick: this.handleCanvasDoubleClick\n }), this.renderFrameNames(), ((_d = this.state.activeEmbeddable) === null || _d === void 0 ? void 0 : _d.state) === \"active\" && ( //zsviczian\n (_f = (_e = this.props).renderEmbeddableMenu) === null || _f === void 0 ? void 0 : _f.call(_e, this.state))]\n })), this.renderEmbeddables()]\n }))\n }))\n }))\n }))\n }))\n }))\n }))\n }));\n }\n\n async componentDidMount() {\n var _a, _b;\n\n this.unmounted = false;\n this.excalidrawContainerValue.container = this.excalidrawContainerRef.current;\n\n if (\"development\" === _constants__WEBPACK_IMPORTED_MODULE_12__.ENV.TEST || \"development\" !== \"production\") {\n const setState = this.setState.bind(this);\n Object.defineProperties(window.h, {\n state: {\n configurable: true,\n get: () => {\n return this.state;\n }\n },\n setState: {\n configurable: true,\n value: (...args) => {\n return this.setState(...args);\n }\n },\n app: {\n configurable: true,\n value: this\n },\n history: {\n configurable: true,\n value: this.history\n }\n });\n }\n\n this.scene.addCallback(this.onSceneUpdated);\n this.addEventListeners();\n\n if (this.props.autoFocus && this.excalidrawContainerRef.current) {\n this.focusContainer();\n }\n\n if (this.excalidrawContainerRef.current && // bounding rects don't work in tests so updating\n // the state on init would result in making the test enviro run\n // in mobile breakpoint (0 width/height), making everything fail\n !(0,_utils__WEBPACK_IMPORTED_MODULE_33__.isTestEnv)()) {\n this.refreshDeviceState(this.excalidrawContainerRef.current);\n }\n\n if (\"ResizeObserver\" in window && ((_a = this.excalidrawContainerRef) === null || _a === void 0 ? void 0 : _a.current)) {\n this.resizeObserver = new ResizeObserver(() => {\n // recompute device dimensions state\n // ---------------------------------------------------------------------\n this.refreshDeviceState(this.excalidrawContainerRef.current); // refresh offsets\n // ---------------------------------------------------------------------\n\n this.updateDOMRect();\n });\n (_b = this.resizeObserver) === null || _b === void 0 ? void 0 : _b.observe(this.excalidrawContainerRef.current);\n } else if (window.matchMedia) {\n const mdScreenQuery = window.matchMedia(`(max-width: ${_constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_WIDTH_PORTRAIT}px), (max-height: ${_constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_HEIGHT_LANDSCAPE}px) and (max-width: ${_constants__WEBPACK_IMPORTED_MODULE_12__.MQ_MAX_WIDTH_LANDSCAPE}px)`);\n const smScreenQuery = window.matchMedia(`(max-width: ${_constants__WEBPACK_IMPORTED_MODULE_12__.MQ_SM_MAX_WIDTH}px)`);\n const canDeviceFitSidebarMediaQuery = window.matchMedia(`(min-width: ${// NOTE this won't update if a different breakpoint is supplied\n // after mount\n this.props.UIOptions.dockedSidebarBreakpoint != null ? this.props.UIOptions.dockedSidebarBreakpoint : _constants__WEBPACK_IMPORTED_MODULE_12__.MQ_RIGHT_SIDEBAR_MIN_WIDTH}px)`);\n\n const handler = () => {\n this.excalidrawContainerRef.current.getBoundingClientRect();\n this.device = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateObject)(this.device, {\n isSmScreen: smScreenQuery.matches,\n isMobile: mdScreenQuery.matches && this.allowMobileMode,\n canDeviceFitSidebar: canDeviceFitSidebarMediaQuery.matches\n });\n };\n\n mdScreenQuery.addListener(handler);\n\n this.detachIsMobileMqHandler = () => mdScreenQuery.removeListener(handler);\n }\n\n const searchParams = new URLSearchParams(window.location.search.slice(1));\n\n if (searchParams.has(\"web-share-target\")) {\n // Obtain a file that was shared via the Web Share Target API.\n this.restoreFileFromShare();\n } else {\n this.updateDOMRect(this.initializeScene);\n } // note that this check seems to always pass in localhost\n\n\n if ((0,_constants__WEBPACK_IMPORTED_MODULE_12__.isBrave)() && !(0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.isMeasureTextSupported)()) {\n this.setState({\n errorMessage: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_BraveMeasureTextError__WEBPACK_IMPORTED_MODULE_60__[\"default\"], {})\n });\n }\n }\n\n componentWillUnmount() {\n var _a;\n\n this.renderer.destroy();\n this.scene = new _scene_Scene__WEBPACK_IMPORTED_MODULE_30__[\"default\"]();\n this.renderer = new _scene_Renderer__WEBPACK_IMPORTED_MODULE_65__.Renderer(this.scene);\n this.files = {};\n this.imageCache.clear();\n (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();\n this.unmounted = true;\n this.removeEventListeners();\n this.scene.destroy();\n this.library.destroy();\n this.laserPathManager.destroy();\n _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_66__.ShapeCache.destroy();\n _snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.destroy();\n clearTimeout(touchTimeout);\n _scene__WEBPACK_IMPORTED_MODULE_29__.isSomeElementSelected.clearCache();\n _groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements.clearCache();\n touchTimeout = 0;\n }\n\n removeEventListeners() {\n var _a, _b, _c, _d, _e;\n\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, this.removePointer);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.COPY, this.onCopy);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.PASTE, this.pasteFromClipboard);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.CUT, this.onCut);\n (_a = this.excalidrawContainerRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.WHEEL, this.onWheel);\n (_b = this.nearestScrollableContainer) === null || _b === void 0 ? void 0 : _b.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.SCROLL, this.onScroll);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYDOWN, this.onKeyDown, false);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.MOUSE_MOVE, this.updateCurrentCursorPosition, false);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYUP, this.onKeyUp);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.RESIZE, this.onResize, false);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.UNLOAD, this.onUnload, false);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.BLUR, this.onBlur, false);\n (_c = this.excalidrawContainerRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.DRAG_OVER, this.disableEvent, false);\n (_d = this.excalidrawContainerRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.DROP, this.disableEvent, false);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.GESTURE_START, this.onGestureStart, false);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.GESTURE_CHANGE, this.onGestureChange, false);\n document.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.GESTURE_END, this.onGestureEnd, false);\n (_e = this.detachIsMobileMqHandler) === null || _e === void 0 ? void 0 : _e.call(this);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.MESSAGE, this.onWindowMessage, false);\n }\n\n addEventListeners() {\n var _a, _b, _c, _d, _e;\n\n this.removeEventListeners();\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.MESSAGE, this.onWindowMessage, false);\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, this.removePointer); // #3553\n\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.COPY, this.onCopy);\n (_a = this.excalidrawContainerRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.WHEEL, this.onWheel, {\n passive: false\n });\n\n if (this.props.handleKeyboardGlobally) {\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYDOWN, this.onKeyDown, false);\n }\n\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYUP, this.onKeyUp, {\n passive: true\n });\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.MOUSE_MOVE, this.updateCurrentCursorPosition); // rerender text elements on font load to fix #637 && #1553\n\n (_c = (_b = document.fonts) === null || _b === void 0 ? void 0 : _b.addEventListener) === null || _c === void 0 ? void 0 : _c.call(_b, \"loadingdone\", event => {\n const loadedFontFaces = event.fontfaces;\n this.fonts.onFontsLoaded(loadedFontFaces);\n }); // Safari-only desktop pinch zoom\n\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.GESTURE_START, this.onGestureStart, false);\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.GESTURE_CHANGE, this.onGestureChange, false);\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.GESTURE_END, this.onGestureEnd, false);\n\n if (this.state.viewModeEnabled) {\n return;\n }\n\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.PASTE, this.pasteFromClipboard);\n document.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.CUT, this.onCut);\n\n if (this.props.detectScroll) {\n this.nearestScrollableContainer = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.getNearestScrollableContainer)(this.excalidrawContainerRef.current);\n this.nearestScrollableContainer.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.SCROLL, this.onScroll);\n }\n\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.RESIZE, this.onResize, false);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.UNLOAD, this.onUnload, false);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.BLUR, this.onBlur, false);\n (_d = this.excalidrawContainerRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.DRAG_OVER, this.disableEvent, false);\n (_e = this.excalidrawContainerRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.DROP, this.disableEvent, false);\n }\n\n componentDidUpdate(prevProps, prevState) {\n var _a, _b, _c, _d, _e, _f;\n\n this.updateEmbeddables();\n\n if (!this.state.showWelcomeScreen && !this.scene.getElementsIncludingDeleted().length) {\n this.setState({\n showWelcomeScreen: true\n });\n }\n\n if (this.excalidrawContainerRef.current && prevProps.UIOptions.dockedSidebarBreakpoint !== this.props.UIOptions.dockedSidebarBreakpoint) {\n this.refreshDeviceState(this.excalidrawContainerRef.current);\n }\n\n if (prevState.scrollX !== this.state.scrollX || prevState.scrollY !== this.state.scrollY) {\n (_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.onScrollChange) === null || _b === void 0 ? void 0 : _b.call(_a, this.state.scrollX, this.state.scrollY);\n }\n\n if (Object.keys(this.state.selectedElementIds).length && (0,_appState__WEBPACK_IMPORTED_MODULE_10__.isEraserActive)(this.state)) {\n this.setState({\n activeTool: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, {\n type: \"selection\"\n })\n });\n }\n\n if (this.state.activeTool.type === \"eraser\" && prevState.theme !== this.state.theme) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setEraserCursor)(this.interactiveCanvas, this.state.theme);\n } // Hide hyperlink popup if shown when element type is not selection\n\n\n if (prevState.activeTool.type === \"selection\" && this.state.activeTool.type !== \"selection\" && this.state.showHyperlinkPopup) {\n this.setState({\n showHyperlinkPopup: false\n });\n }\n\n if (prevProps.langCode !== this.props.langCode) {\n this.updateLanguage();\n }\n\n if (prevProps.viewModeEnabled !== this.props.viewModeEnabled) {\n this.setState({\n viewModeEnabled: !!this.props.viewModeEnabled\n });\n }\n\n if (prevState.viewModeEnabled !== this.state.viewModeEnabled) {\n this.addEventListeners();\n this.deselectElements();\n }\n\n if (prevProps.zenModeEnabled !== this.props.zenModeEnabled) {\n this.setState({\n zenModeEnabled: !!this.props.zenModeEnabled\n });\n }\n\n if (prevProps.theme !== this.props.theme && this.props.theme) {\n this.setState({\n theme: this.props.theme\n });\n }\n\n if (prevProps.gridModeEnabled !== this.props.gridModeEnabled) {\n this.setState({\n gridSize: this.props.gridModeEnabled ? _constants__WEBPACK_IMPORTED_MODULE_12__.GRID_SIZE : null\n });\n }\n\n if (this.props.name && prevProps.name !== this.props.name) {\n this.setState({\n name: this.props.name\n });\n }\n\n (_c = this.excalidrawContainerRef.current) === null || _c === void 0 ? void 0 : _c.classList.toggle(\"theme--dark\", this.state.theme === \"dark\");\n\n if (this.state.editingLinearElement && !this.state.selectedElementIds[this.state.editingLinearElement.elementId]) {\n // defer so that the commitToHistory flag isn't reset via current update\n setTimeout(() => {\n // execute only if the condition still holds when the deferred callback\n // executes (it can be scheduled multiple times depending on how\n // many times the component renders)\n this.state.editingLinearElement && this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n });\n } // failsafe in case the state is being updated in incorrect order resulting\n // in the editingElement being now a deleted element\n\n\n if ((_d = this.state.editingElement) === null || _d === void 0 ? void 0 : _d.isDeleted) {\n this.setState({\n editingElement: null\n });\n }\n\n if (this.state.selectedLinearElement && !this.state.selectedElementIds[this.state.selectedLinearElement.elementId]) {\n // To make sure `selectedLinearElement` is in sync with `selectedElementIds`, however this shouldn't be needed once\n // we have a single API to update `selectedElementIds`\n this.setState({\n selectedLinearElement: null\n });\n }\n\n const {\n multiElement\n } = prevState;\n\n if (prevState.activeTool !== this.state.activeTool && multiElement != null && (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.isBindingEnabled)(this.state) && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBindingElement)(multiElement, false)) {\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.maybeBindLinearElement)(multiElement, this.state, this.scene, (0,_utils__WEBPACK_IMPORTED_MODULE_33__.tupleToCoors)(_element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.getPointAtIndexGlobalCoordinates(multiElement, -1)));\n }\n\n this.history.record(this.state, this.scene.getElementsIncludingDeleted()); // Do not notify consumers if we're still loading the scene. Among other\n // potential issues, this fixes a case where the tab isn't focused during\n // init, which would trigger onChange with empty elements, which would then\n // override whatever is in localStorage currently.\n\n if (!this.state.isLoading) {\n (_f = (_e = this.props).onChange) === null || _f === void 0 ? void 0 : _f.call(_e, this.scene.getElementsIncludingDeleted(), this.state, this.files);\n }\n }\n\n static resetTapTwice() {\n didTapTwice = false;\n }\n\n addTextFromPaste(text, isPlainPaste = false) {\n const {\n x,\n y\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: this.lastViewportPosition.x,\n clientY: this.lastViewportPosition.y\n }, this.state);\n const textElementProps = {\n x,\n y,\n strokeColor: this.state.currentItemStrokeColor,\n backgroundColor: this.state.currentItemBackgroundColor,\n fillStyle: this.state.currentItemFillStyle,\n strokeWidth: this.state.currentItemStrokeWidth,\n strokeStyle: this.state.currentItemStrokeStyle,\n roundness: null,\n roughness: this.state.currentItemRoughness,\n opacity: this.state.currentItemOpacity,\n text,\n rawText: text,\n fontSize: this.state.currentItemFontSize,\n fontFamily: this.state.currentItemFontFamily,\n textAlign: this.state.currentItemTextAlign,\n verticalAlign: _constants__WEBPACK_IMPORTED_MODULE_12__.DEFAULT_VERTICAL_ALIGN,\n locked: false\n };\n const LINE_GAP = 10;\n let currentY = y;\n const lines = isPlainPaste ? [text] : text.split(\"\\n\");\n const textElements = lines.reduce((acc, line, idx) => {\n var _a;\n\n const text = line.trim();\n const lineHeight = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getDefaultLineHeight)(textElementProps.fontFamily);\n\n if (text.length) {\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords({\n x,\n y: currentY\n });\n const element = (0,_element__WEBPACK_IMPORTED_MODULE_16__.newTextElement)(Object.assign(Object.assign({}, textElementProps), {\n x,\n y: currentY,\n text,\n rawText: text,\n //zsviczian\n lineHeight,\n frameId: topLayerFrame ? topLayerFrame.id : null\n }));\n acc.push(element);\n currentY += element.height + LINE_GAP;\n } else {\n const prevLine = (_a = lines[idx - 1]) === null || _a === void 0 ? void 0 : _a.trim(); // add paragraph only if previous line was not empty, IOW don't add\n // more than one empty line\n\n if (prevLine) {\n currentY += (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getLineHeightInPx)(textElementProps.fontSize, lineHeight) + LINE_GAP;\n }\n }\n\n return acc;\n }, []);\n\n if (textElements.length === 0) {\n return;\n }\n\n const frameId = textElements[0].frameId;\n\n if (frameId) {\n this.scene.insertElementsAtIndex(textElements, this.scene.getElementIndex(frameId));\n } else {\n this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted(), ...textElements]);\n }\n\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.fromEntries(textElements.map(el => [el.id, true])), this.state)\n });\n\n if (!isPlainPaste && textElements.length > 1 && PLAIN_PASTE_TOAST_SHOWN === false && !this.device.isMobile) {\n this.setToast({\n message: (0,_i18n__WEBPACK_IMPORTED_MODULE_25__.t)(\"toast.pasteAsSingleElement\", {\n shortcut: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.getShortcutKey)(\"CtrlOrCmd+Shift+V\")\n }),\n duration: 5000\n });\n PLAIN_PASTE_TOAST_SHOWN = true;\n }\n\n this.history.resumeRecording();\n }\n\n handleTextWysiwyg(element, {\n isExistingElement = false\n }) {\n const updateElement = (text, originalText, isDeleted, rawText, link) => {\n this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted().map(_element => {\n if (_element.id === element.id && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(_element)) {\n return (0,_element__WEBPACK_IMPORTED_MODULE_16__.updateTextElement)(_element, {\n text,\n isDeleted,\n originalText,\n rawText: rawText !== null && rawText !== void 0 ? rawText : originalText,\n link\n });\n }\n\n return _element;\n })]);\n };\n\n if (isExistingElement && this.props.onBeforeTextEdit) {\n const text = this.props.onBeforeTextEdit(element);\n\n if (text) {\n this.scene.replaceAllElements([...this.scene.getElementsIncludingDeleted().map(_element => {\n if (_element.id === element.id && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(_element)) {\n element = (0,_element__WEBPACK_IMPORTED_MODULE_16__.updateTextElement)(_element, {\n text,\n isDeleted: false,\n originalText: text\n });\n return element;\n }\n\n return _element;\n })]);\n }\n }\n\n (0,_element__WEBPACK_IMPORTED_MODULE_16__.textWysiwyg)({\n id: element.id,\n canvas: this.canvas,\n getViewportCoords: (x, y) => {\n const {\n x: viewportX,\n y: viewportY\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.sceneCoordsToViewportCoords)({\n sceneX: x,\n sceneY: y\n }, this.state);\n return [viewportX - this.state.offsetLeft, viewportY - this.state.offsetTop];\n },\n onChange: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(text => {\n updateElement(text, text, false);\n\n if ((0,_element__WEBPACK_IMPORTED_MODULE_16__.isNonDeletedElement)(element)) {\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.updateBoundElements)(element);\n }\n }),\n onSubmit: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(({\n text,\n viaKeyboard,\n originalText\n }) => {\n const isDeleted = !text.trim();\n const rawText = originalText; //should this be originalText??\n\n let link = undefined;\n\n if (this.props.onBeforeTextSubmit) {\n const [updatedText, updatedOriginalText, l] = this.props.onBeforeTextSubmit(element, text, originalText, isDeleted);\n text = updatedText !== null && updatedText !== void 0 ? updatedText : text;\n originalText = updatedOriginalText !== null && updatedOriginalText !== void 0 ? updatedOriginalText : originalText;\n link = l;\n }\n\n updateElement(text, originalText, isDeleted, rawText, link); // select the created text element only if submitting via keyboard\n // (when submitting via click it should act as signal to deselect)\n\n if (!isDeleted && viaKeyboard) {\n const elementIdToSelect = element.containerId ? element.containerId : element.id;\n this.setState(prevState => ({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.assign(Object.assign({}, prevState.selectedElementIds), {\n [elementIdToSelect]: true\n }), prevState)\n }));\n }\n\n if (isDeleted) {\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.fixBindingsAfterDeletion)(this.scene.getNonDeletedElements(), [element]);\n }\n\n if (!isDeleted || isExistingElement) {\n this.history.resumeRecording();\n }\n\n this.setState({\n draggingElement: null,\n editingElement: null\n });\n\n if (this.state.activeTool.locked) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n }\n\n this.focusContainer();\n }),\n element,\n excalidrawContainer: this.excalidrawContainerRef.current,\n app: this\n }); // deselect all other elements when inserting text\n\n this.deselectElements(); // do an initial update to re-initialize element position since we were\n // modifying element's x/y for sake of editor (case: syncing to remote)\n\n updateElement(element.text, element.originalText, false);\n }\n\n deselectElements() {\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n selectedGroupIds: {},\n editingGroupId: null,\n activeEmbeddable: null\n });\n }\n\n getTextElementAtPosition(x, y) {\n const element = this.getElementAtPosition(x, y, {\n includeBoundTextElement: true\n });\n\n if (element && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(element) && !element.isDeleted) {\n return element;\n }\n\n return null;\n }\n\n getElementAtPosition(x, y, opts) {\n const allHitElements = this.getElementsAtPosition(x, y, opts === null || opts === void 0 ? void 0 : opts.includeBoundTextElement, opts === null || opts === void 0 ? void 0 : opts.includeLockedElements);\n\n if (allHitElements.length > 1) {\n if (opts === null || opts === void 0 ? void 0 : opts.preferSelected) {\n for (let index = allHitElements.length - 1; index > -1; index--) {\n if (this.state.selectedElementIds[allHitElements[index].id]) {\n return allHitElements[index];\n }\n }\n }\n\n const elementWithHighestZIndex = allHitElements[allHitElements.length - 1]; // If we're hitting element with highest z-index only on its bounding box\n // while also hitting other element figure, the latter should be considered.\n\n return (0,_element__WEBPACK_IMPORTED_MODULE_16__.isHittingElementBoundingBoxWithoutHittingElement)(elementWithHighestZIndex, this.state, this.frameNameBoundsCache, x, y) ? allHitElements[allHitElements.length - 2] : elementWithHighestZIndex;\n }\n\n if (allHitElements.length === 1) {\n return allHitElements[0];\n }\n\n return null;\n }\n\n getElementsAtPosition(x, y, includeBoundTextElement = false, includeLockedElements = false) {\n const elements = includeBoundTextElement && includeLockedElements ? this.scene.getNonDeletedElements() : this.scene.getNonDeletedElements().filter(element => (includeLockedElements || !element.locked) && (includeBoundTextElement || !((0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(element) && element.containerId)));\n return (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getElementsAtPosition)(elements, element => (0,_element__WEBPACK_IMPORTED_MODULE_16__.hitTest)(element, this.state, this.frameNameBoundsCache, x, y)).filter(element => {\n // hitting a frame's element from outside the frame is not considered a hit\n const containingFrame = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getContainingFrame)(element);\n return containingFrame && this.state.frameRendering.enabled && this.state.frameRendering.clip ? (0,_frame__WEBPACK_IMPORTED_MODULE_51__.isCursorInFrame)({\n x,\n y\n }, containingFrame) : true;\n });\n }\n\n handleHoverSelectedLinearElement(linearElementEditor, scenePointerX, scenePointerY) {\n const element = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.getElement(linearElementEditor.elementId);\n const boundTextElement = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getBoundTextElement)(element);\n\n if (!element) {\n return;\n }\n\n if (this.state.selectedLinearElement) {\n let hoverPointIndex = -1;\n let segmentMidPointHoveredCoords = null;\n\n if ((0,_element_collision__WEBPACK_IMPORTED_MODULE_44__.isHittingElementNotConsideringBoundingBox)(element, this.state, this.frameNameBoundsCache, [scenePointerX, scenePointerY])) {\n hoverPointIndex = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.getPointIndexUnderCursor(element, this.state.zoom, scenePointerX, scenePointerY);\n segmentMidPointHoveredCoords = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.getSegmentMidpointHitCoords(linearElementEditor, {\n x: scenePointerX,\n y: scenePointerY\n }, this.state);\n\n if (hoverPointIndex >= 0 || segmentMidPointHoveredCoords) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.POINTER);\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.MOVE);\n }\n } else if ((0,_element_transformHandles__WEBPACK_IMPORTED_MODULE_48__.shouldShowBoundingBox)([element], this.state) && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isHittingElementBoundingBoxWithoutHittingElement)(element, this.state, this.frameNameBoundsCache, scenePointerX, scenePointerY)) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.MOVE);\n } else if (boundTextElement && (0,_element__WEBPACK_IMPORTED_MODULE_16__.hitTest)(boundTextElement, this.state, this.frameNameBoundsCache, scenePointerX, scenePointerY)) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.MOVE);\n }\n\n if (this.state.selectedLinearElement.hoverPointIndex !== hoverPointIndex) {\n this.setState({\n selectedLinearElement: Object.assign(Object.assign({}, this.state.selectedLinearElement), {\n hoverPointIndex\n })\n });\n }\n\n if (!_element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.arePointsEqual(this.state.selectedLinearElement.segmentMidPointHoveredCoords, segmentMidPointHoveredCoords)) {\n this.setState({\n selectedLinearElement: Object.assign(Object.assign({}, this.state.selectedLinearElement), {\n segmentMidPointHoveredCoords\n })\n });\n }\n } else {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursor)(this.interactiveCanvas, _constants__WEBPACK_IMPORTED_MODULE_12__.CURSOR_TYPE.AUTO);\n }\n }\n\n maybeCleanupAfterMissingPointerUp(event) {\n if (lastPointerUp !== null) {\n // Unfortunately, sometimes we don't get a pointerup after a pointerdown,\n // this can happen when a contextual menu or alert is triggered. In order to avoid\n // being in a weird state, we clean up on the next pointerdown\n lastPointerUp(event);\n }\n }\n\n updateGestureOnPointerDown(event) {\n gesture.pointers.set(event.pointerId, {\n x: event.clientX,\n y: event.clientY\n });\n\n if (gesture.pointers.size === 2) {\n gesture.lastCenter = (0,_gesture__WEBPACK_IMPORTED_MODULE_22__.getCenter)(gesture.pointers);\n gesture.initialScale = this.state.zoom.value;\n gesture.initialDistance = (0,_gesture__WEBPACK_IMPORTED_MODULE_22__.getDistance)(Array.from(gesture.pointers.values()));\n }\n }\n\n initialPointerDownState(event) {\n const origin = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n const selectedElements = this.scene.getSelectedElements(this.state);\n const [minX, minY, maxX, maxY] = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getCommonBounds)(selectedElements);\n return {\n origin,\n withCmdOrCtrl: event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD],\n originInGrid: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.tupleToCoors)((0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(origin.x, origin.y, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize)),\n scrollbars: (0,_scene__WEBPACK_IMPORTED_MODULE_29__.isOverScrollBars)(currentScrollBars, event.clientX - this.state.offsetLeft, event.clientY - this.state.offsetTop),\n // we need to duplicate because we'll be updating this state\n lastCoords: Object.assign({}, origin),\n originalElements: this.scene.getNonDeletedElements().reduce((acc, element) => {\n acc.set(element.id, (0,_element_newElement__WEBPACK_IMPORTED_MODULE_20__.deepCopyElement)(element));\n return acc;\n }, new Map()),\n resize: {\n handleType: false,\n isResizing: false,\n offset: {\n x: 0,\n y: 0\n },\n arrowDirection: \"origin\",\n center: {\n x: (maxX + minX) / 2,\n y: (maxY + minY) / 2\n }\n },\n hit: {\n element: null,\n allHitElements: [],\n wasAddedToSelection: false,\n hasBeenDuplicated: false,\n hasHitCommonBoundingBoxOfSelectedElements: this.isHittingCommonBoundingBoxOfSelectedElements(origin, selectedElements)\n },\n drag: {\n hasOccurred: false,\n offset: null\n },\n eventListeners: {\n onMove: null,\n onUp: null,\n onKeyUp: null,\n onKeyDown: null\n },\n boxSelection: {\n hasOccurred: false\n },\n elementIdsToErase: {}\n };\n } // Returns whether the event is a dragging a scrollbar\n\n\n handleDraggingScrollBar(event, pointerDownState) {\n if (!(pointerDownState.scrollbars.isOverEither && !this.state.multiElement)) {\n return false;\n }\n\n isDraggingScrollBar = true;\n pointerDownState.lastCoords.x = event.clientX;\n pointerDownState.lastCoords.y = event.clientY;\n const onPointerMove = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdatesThrottled)(event => {\n const target = event.target;\n\n if (!(target instanceof HTMLElement)) {\n return;\n }\n\n this.handlePointerMoveOverScrollbars(event, pointerDownState);\n });\n const onPointerUp = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(() => {\n isDraggingScrollBar = false;\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.setCursorForShape)(this.interactiveCanvas, this.state);\n lastPointerUp = null;\n this.setState({\n cursorButton: \"up\"\n });\n this.savePointer(event.clientX, event.clientY, \"up\");\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_MOVE, onPointerMove);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, onPointerUp);\n onPointerMove.flush();\n });\n lastPointerUp = onPointerUp;\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_MOVE, onPointerMove);\n window.addEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, onPointerUp);\n return true;\n }\n\n isASelectedElement(hitElement) {\n return hitElement != null && this.state.selectedElementIds[hitElement.id];\n }\n\n isHittingCommonBoundingBoxOfSelectedElements(point, selectedElements) {\n if (selectedElements.length < 2) {\n return false;\n } // How many pixels off the shape boundary we still consider a hit\n\n\n const threshold = 10 / this.state.zoom.value;\n const [x1, y1, x2, y2] = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getCommonBounds)(selectedElements);\n return point.x > x1 - threshold && point.x < x2 + threshold && point.y > y1 - threshold && point.y < y2 + threshold;\n }\n\n getCurrentItemRoundness(elementType) {\n return this.state.currentItemRoundness === \"round\" ? {\n type: (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isUsingAdaptiveRadius)(elementType) ? _constants__WEBPACK_IMPORTED_MODULE_12__.ROUNDNESS.ADAPTIVE_RADIUS : _constants__WEBPACK_IMPORTED_MODULE_12__.ROUNDNESS.PROPORTIONAL_RADIUS\n } : null;\n }\n\n maybeCacheReferenceSnapPoints(event, selectedElements, recomputeAnyways = false) {\n if ((0,_snapping__WEBPACK_IMPORTED_MODULE_58__.isSnappingEnabled)({\n event,\n appState: this.state,\n selectedElements\n }) && (recomputeAnyways || !_snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.getReferenceSnapPoints())) {\n _snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.setReferenceSnapPoints((0,_snapping__WEBPACK_IMPORTED_MODULE_58__.getReferenceSnapPoints)(this.scene.getNonDeletedElements(), selectedElements, this.state));\n }\n }\n\n maybeCacheVisibleGaps(event, selectedElements, recomputeAnyways = false) {\n if ((0,_snapping__WEBPACK_IMPORTED_MODULE_58__.isSnappingEnabled)({\n event,\n appState: this.state,\n selectedElements\n }) && (recomputeAnyways || !_snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.getVisibleGaps())) {\n _snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.setVisibleGaps((0,_snapping__WEBPACK_IMPORTED_MODULE_58__.getVisibleGaps)(this.scene.getNonDeletedElements(), selectedElements, this.state));\n }\n }\n\n onKeyDownFromPointerDownHandler(pointerDownState) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n if (this.maybeHandleResize(pointerDownState, event)) {\n return;\n }\n\n this.maybeDragNewGenericElement(pointerDownState, event);\n });\n }\n\n onKeyUpFromPointerDownHandler(pointerDownState) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(event => {\n // Prevents focus from escaping excalidraw tab\n event.key === _keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.ALT && event.preventDefault();\n\n if (this.maybeHandleResize(pointerDownState, event)) {\n return;\n }\n\n this.maybeDragNewGenericElement(pointerDownState, event);\n });\n }\n\n onPointerMoveFromPointerDownHandler(pointerDownState) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdatesThrottled)(event => {\n var _a, _b; // We need to initialize dragOffsetXY only after we've updated\n // `state.selectedElementIds` on pointerDown. Doing it here in pointerMove\n // event handler should hopefully ensure we're already working with\n // the updated state.\n\n\n if (pointerDownState.drag.offset === null) {\n pointerDownState.drag.offset = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.tupleToCoors)((0,_element__WEBPACK_IMPORTED_MODULE_16__.getDragOffsetXY)(this.scene.getSelectedElements(this.state), pointerDownState.origin.x, pointerDownState.origin.y));\n }\n\n const target = event.target;\n\n if (!(target instanceof HTMLElement)) {\n return;\n }\n\n if (this.handlePointerMoveOverScrollbars(event, pointerDownState)) {\n return;\n }\n\n const pointerCoords = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(event, this.state);\n\n if ((0,_appState__WEBPACK_IMPORTED_MODULE_10__.isEraserActive)(this.state)) {\n this.handleEraser(event, pointerDownState, pointerCoords);\n return;\n }\n\n if (this.state.activeTool.type === \"laser\") {\n this.laserPathManager.addPointToPath(pointerCoords.x, pointerCoords.y);\n }\n\n const [gridX, gridY] = (0,_math__WEBPACK_IMPORTED_MODULE_28__.getGridPoint)(pointerCoords.x, pointerCoords.y, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize); // for arrows/lines, don't start dragging until a given threshold\n // to ensure we don't create a 2-point arrow by mistake when\n // user clicks mouse in a way that it moves a tiny bit (thus\n // triggering pointermove)\n\n if (!pointerDownState.drag.hasOccurred && (this.state.activeTool.type === \"arrow\" || this.state.activeTool.type === \"line\")) {\n if ((0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(pointerCoords.x, pointerCoords.y, pointerDownState.origin.x, pointerDownState.origin.y) < _constants__WEBPACK_IMPORTED_MODULE_12__.DRAGGING_THRESHOLD) {\n return;\n }\n }\n\n if (pointerDownState.resize.isResizing) {\n pointerDownState.lastCoords.x = pointerCoords.x;\n pointerDownState.lastCoords.y = pointerCoords.y;\n\n if (this.maybeHandleResize(pointerDownState, event)) {\n return true;\n }\n }\n\n if (this.state.selectedLinearElement) {\n const linearElementEditor = this.state.editingLinearElement || this.state.selectedLinearElement;\n\n if (_element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.shouldAddMidpoint(this.state.selectedLinearElement, pointerCoords, this.state)) {\n const ret = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.addMidpoint(this.state.selectedLinearElement, pointerCoords, this.state, !event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD]);\n\n if (!ret) {\n return;\n } // Since we are reading from previous state which is not possible with\n // automatic batching in React 18 hence using flush sync to synchronously\n // update the state. Check https://github.com/excalidraw/excalidraw/pull/5508 for more details.\n\n\n (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.flushSync)(() => {\n if (this.state.selectedLinearElement) {\n this.setState({\n selectedLinearElement: Object.assign(Object.assign({}, this.state.selectedLinearElement), {\n pointerDownState: ret.pointerDownState,\n selectedPointsIndices: ret.selectedPointsIndices\n })\n });\n }\n\n if (this.state.editingLinearElement) {\n this.setState({\n editingLinearElement: Object.assign(Object.assign({}, this.state.editingLinearElement), {\n pointerDownState: ret.pointerDownState,\n selectedPointsIndices: ret.selectedPointsIndices\n })\n });\n }\n });\n return;\n } else if (linearElementEditor.pointerDownState.segmentMidpoint.value !== null && !linearElementEditor.pointerDownState.segmentMidpoint.added) {\n return;\n }\n\n const didDrag = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.handlePointDragging(event, this.state, pointerCoords.x, pointerCoords.y, (element, pointsSceneCoords) => {\n this.maybeSuggestBindingsForLinearElementAtCoords(element, pointsSceneCoords);\n }, linearElementEditor);\n\n if (didDrag) {\n pointerDownState.lastCoords.x = pointerCoords.x;\n pointerDownState.lastCoords.y = pointerCoords.y;\n pointerDownState.drag.hasOccurred = true;\n\n if (this.state.editingLinearElement && !this.state.editingLinearElement.isDragging) {\n this.setState({\n editingLinearElement: Object.assign(Object.assign({}, this.state.editingLinearElement), {\n isDragging: true\n })\n });\n }\n\n if (!this.state.selectedLinearElement.isDragging) {\n this.setState({\n selectedLinearElement: Object.assign(Object.assign({}, this.state.selectedLinearElement), {\n isDragging: true\n })\n });\n }\n\n return;\n }\n }\n\n const hasHitASelectedElement = pointerDownState.hit.allHitElements.some(element => this.isASelectedElement(element));\n const isSelectingPointsInLineEditor = this.state.editingLinearElement && event.shiftKey && this.state.editingLinearElement.elementId === ((_a = pointerDownState.hit.element) === null || _a === void 0 ? void 0 : _a.id);\n\n if ((hasHitASelectedElement || pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements) && !isSelectingPointsInLineEditor) {\n const selectedElements = this.scene.getSelectedElements(this.state);\n\n if (selectedElements.every(element => element.locked)) {\n return;\n }\n\n const selectedElementsHasAFrame = selectedElements.find(e => (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isFrameElement)(e));\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords(pointerCoords);\n this.setState({\n frameToHighlight: topLayerFrame && !selectedElementsHasAFrame ? topLayerFrame : null\n }); // Marking that click was used for dragging to check\n // if elements should be deselected on pointerup\n\n pointerDownState.drag.hasOccurred = true;\n this.setState({\n selectedElementsAreBeingDragged: true\n }); // prevent dragging even if we're no longer holding cmd/ctrl otherwise\n // it would have weird results (stuff jumping all over the screen)\n // Checking for editingElement to avoid jump while editing on mobile #6503\n\n if (selectedElements.length > 0 && !pointerDownState.withCmdOrCtrl && !this.state.editingElement && ((_b = this.state.activeEmbeddable) === null || _b === void 0 ? void 0 : _b.state) !== \"active\") {\n const dragOffset = {\n x: pointerCoords.x - pointerDownState.origin.x,\n y: pointerCoords.y - pointerDownState.origin.y\n };\n const originalElements = [...pointerDownState.originalElements.values()]; // We only drag in one direction if shift is pressed\n\n const lockDirection = event.shiftKey;\n\n if (lockDirection) {\n const distanceX = Math.abs(dragOffset.x);\n const distanceY = Math.abs(dragOffset.y);\n const lockX = lockDirection && distanceX < distanceY;\n const lockY = lockDirection && distanceX > distanceY;\n\n if (lockX) {\n dragOffset.x = 0;\n }\n\n if (lockY) {\n dragOffset.y = 0;\n }\n } // Snap cache *must* be synchronously popuplated before initial drag,\n // otherwise the first drag even will not snap, causing a jump before\n // it snaps to its position if previously snapped already.\n\n\n this.maybeCacheVisibleGaps(event, selectedElements);\n this.maybeCacheReferenceSnapPoints(event, selectedElements);\n const {\n snapOffset,\n snapLines\n } = (0,_snapping__WEBPACK_IMPORTED_MODULE_58__.snapDraggedElements)((0,_scene__WEBPACK_IMPORTED_MODULE_29__.getSelectedElements)(originalElements, this.state), dragOffset, this.state, event);\n this.setState({\n snapLines\n }); // when we're editing the name of a frame, we want the user to be\n // able to select and interact with the text input\n\n !this.state.editingFrame && (0,_element__WEBPACK_IMPORTED_MODULE_16__.dragSelectedElements)(pointerDownState, selectedElements, dragOffset, this.state, this.scene, snapOffset, event[_keys__WEBPACK_IMPORTED_MODULE_26__.KEYS.CTRL_OR_CMD] ? null : this.state.gridSize);\n this.maybeSuggestBindingForAll(selectedElements); // We duplicate the selected element if alt is pressed on pointer move\n\n if (event.altKey && !pointerDownState.hit.hasBeenDuplicated) {\n // Move the currently selected elements to the top of the z index stack, and\n // put the duplicates where the selected elements used to be.\n // (the origin point where the dragging started)\n pointerDownState.hit.hasBeenDuplicated = true;\n const nextElements = [];\n const elementsToAppend = [];\n const groupIdMap = new Map();\n const oldIdToDuplicatedId = new Map();\n const hitElement = pointerDownState.hit.element;\n const selectedElementIds = new Set(this.scene.getSelectedElements({\n selectedElementIds: this.state.selectedElementIds,\n includeBoundTextElement: true,\n includeElementsInFrames: true\n }).map(element => element.id));\n const elements = this.scene.getElementsIncludingDeleted();\n\n for (const element of elements) {\n if (selectedElementIds.has(element.id) || // case: the state.selectedElementIds might not have been\n // updated yet by the time this mousemove event is fired\n element.id === (hitElement === null || hitElement === void 0 ? void 0 : hitElement.id) && pointerDownState.hit.wasAddedToSelection) {\n const duplicatedElement = (0,_element__WEBPACK_IMPORTED_MODULE_16__.duplicateElement)(this.state.editingGroupId, groupIdMap, element);\n const origElement = pointerDownState.originalElements.get(element.id);\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(duplicatedElement, {\n x: origElement.x,\n y: origElement.y\n }); // put duplicated element to pointerDownState.originalElements\n // so that we can snap to the duplicated element without releasing\n\n pointerDownState.originalElements.set(duplicatedElement.id, duplicatedElement);\n nextElements.push(duplicatedElement);\n elementsToAppend.push(element);\n oldIdToDuplicatedId.set(element.id, duplicatedElement.id);\n } else {\n nextElements.push(element);\n }\n }\n\n const nextSceneElements = [...nextElements, ...elementsToAppend];\n (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.bindTextToShapeAfterDuplication)(nextElements, elementsToAppend, oldIdToDuplicatedId);\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.fixBindingsAfterDuplication)(nextSceneElements, elementsToAppend, oldIdToDuplicatedId, \"duplicatesServeAsOld\");\n (0,_frame__WEBPACK_IMPORTED_MODULE_51__.bindElementsToFramesAfterDuplication)(nextSceneElements, elementsToAppend, oldIdToDuplicatedId);\n this.scene.replaceAllElements(nextSceneElements);\n this.maybeCacheVisibleGaps(event, selectedElements, true);\n this.maybeCacheReferenceSnapPoints(event, selectedElements, true);\n }\n\n return;\n }\n } // It is very important to read this.state within each move event,\n // otherwise we would read a stale one!\n\n\n const draggingElement = this.state.draggingElement;\n\n if (!draggingElement) {\n return;\n }\n\n if (draggingElement.type === \"freedraw\") {\n const points = draggingElement.points;\n const dx = pointerCoords.x - draggingElement.x;\n const dy = pointerCoords.y - draggingElement.y;\n const lastPoint = points.length > 0 && points[points.length - 1];\n const discardPoint = lastPoint && lastPoint[0] === dx && lastPoint[1] === dy;\n\n if (!discardPoint) {\n const strokeOptions = this.state.currentStrokeOptions; //zsviczian\n\n const pressures = draggingElement.simulatePressure ? draggingElement.pressures : [//zsviczian\n ...draggingElement.pressures, (strokeOptions === null || strokeOptions === void 0 ? void 0 : strokeOptions.constantPressure) ? 1 : event.pressure];\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(draggingElement, {\n points: [...points, [dx, dy]],\n pressures\n });\n }\n } else if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(draggingElement)) {\n pointerDownState.drag.hasOccurred = true;\n this.setState({\n selectedElementsAreBeingDragged: true\n });\n const points = draggingElement.points;\n let dx = gridX - draggingElement.x;\n let dy = gridY - draggingElement.y;\n\n if ((0,_keys__WEBPACK_IMPORTED_MODULE_26__.shouldRotateWithDiscreteAngle)(event) && points.length === 2) {\n ({\n width: dx,\n height: dy\n } = (0,_element__WEBPACK_IMPORTED_MODULE_16__.getLockedLinearCursorAlignSize)(draggingElement.x, draggingElement.y, pointerCoords.x, pointerCoords.y));\n }\n\n if (points.length === 1) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(draggingElement, {\n points: [...points, [dx, dy]]\n });\n } else if (points.length === 2) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(draggingElement, {\n points: [...points.slice(0, -1), [dx, dy]]\n });\n }\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBindingElement)(draggingElement, false)) {\n // When creating a linear element by dragging\n this.maybeSuggestBindingsForLinearElementAtCoords(draggingElement, [pointerCoords], this.state.startBoundElement);\n }\n } else {\n pointerDownState.lastCoords.x = pointerCoords.x;\n pointerDownState.lastCoords.y = pointerCoords.y;\n this.maybeDragNewGenericElement(pointerDownState, event);\n }\n\n if (this.state.activeTool.type === \"selection\") {\n pointerDownState.boxSelection.hasOccurred = true;\n const elements = this.scene.getNonDeletedElements(); // box-select line editor points\n\n if (this.state.editingLinearElement) {\n _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.handleBoxSelection(event, this.state, this.setState.bind(this)); // regular box-select\n } else {\n let shouldReuseSelection = true;\n\n if (!event.shiftKey && (0,_scene__WEBPACK_IMPORTED_MODULE_29__.isSomeElementSelected)(elements, this.state)) {\n if (pointerDownState.withCmdOrCtrl && pointerDownState.hit.element) {\n this.setState(prevState => (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)(Object.assign(Object.assign({}, prevState), {\n selectedElementIds: {\n [pointerDownState.hit.element.id]: true\n }\n }), this.scene.getNonDeletedElements(), prevState, this));\n } else {\n shouldReuseSelection = false;\n }\n }\n\n const elementsWithinSelection = (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getElementsWithinSelection)(elements, draggingElement);\n this.setState(prevState => {\n const nextSelectedElementIds = Object.assign(Object.assign({}, shouldReuseSelection && prevState.selectedElementIds), elementsWithinSelection.reduce((acc, element) => {\n acc[element.id] = true;\n return acc;\n }, {}));\n\n if (pointerDownState.hit.element) {\n // if using ctrl/cmd, select the hitElement only if we\n // haven't box-selected anything else\n if (!elementsWithinSelection.length) {\n nextSelectedElementIds[pointerDownState.hit.element.id] = true;\n } else {\n delete nextSelectedElementIds[pointerDownState.hit.element.id];\n }\n }\n\n prevState = !shouldReuseSelection ? Object.assign(Object.assign({}, prevState), {\n selectedGroupIds: {},\n editingGroupId: null\n }) : prevState;\n return Object.assign(Object.assign({}, (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: prevState.editingGroupId,\n selectedElementIds: nextSelectedElementIds\n }, this.scene.getNonDeletedElements(), prevState, this)), {\n // select linear element only when we haven't box-selected anything else\n selectedLinearElement: elementsWithinSelection.length === 1 && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(elementsWithinSelection[0]) ? new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(elementsWithinSelection[0], this.scene) : null,\n showHyperlinkPopup: elementsWithinSelection.length === 1 && (elementsWithinSelection[0].link || (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(elementsWithinSelection[0])) ? \"info\" : false\n });\n });\n }\n }\n });\n } // Returns whether the pointer move happened over either scrollbar\n\n\n handlePointerMoveOverScrollbars(event, pointerDownState) {\n if (pointerDownState.scrollbars.isOverHorizontal) {\n const x = event.clientX;\n const dx = x - pointerDownState.lastCoords.x;\n this.translateCanvas({\n scrollX: this.state.scrollX - dx / this.state.zoom.value\n });\n pointerDownState.lastCoords.x = x;\n return true;\n }\n\n if (pointerDownState.scrollbars.isOverVertical) {\n const y = event.clientY;\n const dy = y - pointerDownState.lastCoords.y;\n this.translateCanvas({\n scrollY: this.state.scrollY - dy / this.state.zoom.value\n });\n pointerDownState.lastCoords.y = y;\n return true;\n }\n\n return false;\n }\n\n onPointerUpFromPointerDownHandler(pointerDownState) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_33__.withBatchedUpdates)(childEvent => {\n var _a, _b, _c, _d, _e, _f;\n\n if (pointerDownState.eventListeners.onMove) {\n pointerDownState.eventListeners.onMove.flush();\n }\n\n const {\n draggingElement,\n resizingElement,\n multiElement,\n activeTool,\n isResizing,\n isRotating\n } = this.state;\n this.setState({\n isResizing: false,\n isRotating: false,\n resizingElement: null,\n selectionElement: null,\n frameToHighlight: null,\n elementsToHighlight: null,\n cursorButton: \"up\",\n // text elements are reset on finalize, and resetting on pointerup\n // may cause issues with double taps\n editingElement: multiElement || (0,_element__WEBPACK_IMPORTED_MODULE_16__.isTextElement)(this.state.editingElement) ? this.state.editingElement : null,\n snapLines: [],\n originSnapOffset: null\n });\n _snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.setReferenceSnapPoints(null);\n _snapping__WEBPACK_IMPORTED_MODULE_58__.SnapCache.setVisibleGaps(null);\n this.savePointer(childEvent.clientX, childEvent.clientY, \"up\");\n this.setState({\n selectedElementsAreBeingDragged: false\n }); // Handle end of dragging a point of a linear element, might close a loop\n // and sets binding element\n\n if (this.state.editingLinearElement) {\n if (!pointerDownState.boxSelection.hasOccurred && ((_b = (_a = pointerDownState.hit) === null || _a === void 0 ? void 0 : _a.element) === null || _b === void 0 ? void 0 : _b.id) !== this.state.editingLinearElement.elementId) {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n } else {\n const editingLinearElement = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.handlePointerUp(childEvent, this.state.editingLinearElement, this.state);\n\n if (editingLinearElement !== this.state.editingLinearElement) {\n this.setState({\n editingLinearElement,\n suggestedBindings: []\n });\n }\n }\n } else if (this.state.selectedLinearElement) {\n if (((_d = (_c = pointerDownState.hit) === null || _c === void 0 ? void 0 : _c.element) === null || _d === void 0 ? void 0 : _d.id) !== this.state.selectedLinearElement.elementId) {\n const selectedELements = this.scene.getSelectedElements(this.state); // set selectedLinearElement to null if there is more than one element selected since we don't want to show linear element handles\n\n if (selectedELements.length > 1) {\n this.setState({\n selectedLinearElement: null\n });\n }\n } else {\n const linearElementEditor = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor.handlePointerUp(childEvent, this.state.selectedLinearElement, this.state);\n const {\n startBindingElement,\n endBindingElement\n } = linearElementEditor;\n const element = this.scene.getElement(linearElementEditor.elementId);\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBindingElement)(element)) {\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.bindOrUnbindLinearElement)(element, startBindingElement, endBindingElement);\n }\n\n if (linearElementEditor !== this.state.selectedLinearElement) {\n this.setState({\n selectedLinearElement: Object.assign(Object.assign({}, linearElementEditor), {\n selectedPointsIndices: null\n }),\n suggestedBindings: []\n });\n }\n }\n }\n\n lastPointerUp = null;\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_MOVE, pointerDownState.eventListeners.onMove);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.POINTER_UP, pointerDownState.eventListeners.onUp);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYDOWN, pointerDownState.eventListeners.onKeyDown);\n window.removeEventListener(_constants__WEBPACK_IMPORTED_MODULE_12__.EVENT.KEYUP, pointerDownState.eventListeners.onKeyUp);\n\n if (this.state.pendingImageElementId) {\n this.setState({\n pendingImageElementId: null\n });\n }\n\n if ((draggingElement === null || draggingElement === void 0 ? void 0 : draggingElement.type) === \"freedraw\") {\n const pointerCoords = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(childEvent, this.state);\n const points = draggingElement.points;\n let dx = pointerCoords.x - draggingElement.x;\n let dy = pointerCoords.y - draggingElement.y; // Allows dots to avoid being flagged as infinitely small\n\n if (dx === points[0][0] && dy === points[0][1]) {\n dy += 0.0001;\n dx += 0.0001;\n }\n\n const pressures = draggingElement.simulatePressure ? [] : [...draggingElement.pressures, childEvent.pressure];\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(draggingElement, {\n points: [...points, [dx, dy]],\n pressures,\n lastCommittedPoint: [dx, dy]\n });\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n return;\n }\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isImageElement)(draggingElement)) {\n const imageElement = draggingElement;\n\n try {\n this.initializeImageDimensions(imageElement);\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({\n [imageElement.id]: true\n }, this.state)\n }, () => {\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n });\n } catch (error) {\n console.error(error);\n this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter(el => el.id !== imageElement.id));\n this.actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_5__.actionFinalize);\n }\n\n return;\n }\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(draggingElement)) {\n if (draggingElement.points.length > 1) {\n this.history.resumeRecording();\n }\n\n const pointerCoords = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(childEvent, this.state);\n\n if (!pointerDownState.drag.hasOccurred && draggingElement && !multiElement) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(draggingElement, {\n points: [...draggingElement.points, [pointerCoords.x - draggingElement.x, pointerCoords.y - draggingElement.y]]\n });\n this.setState({\n multiElement: draggingElement,\n editingElement: this.state.draggingElement\n });\n } else if (pointerDownState.drag.hasOccurred && !multiElement) {\n if ((0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.isBindingEnabled)(this.state) && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBindingElement)(draggingElement, false)) {\n (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.maybeBindLinearElement)(draggingElement, this.state, this.scene, pointerCoords);\n }\n\n this.setState({\n suggestedBindings: [],\n startBoundElement: null\n });\n\n if (!activeTool.locked) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n this.setState(prevState => ({\n draggingElement: null,\n activeTool: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, {\n type: \"selection\"\n }),\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.assign(Object.assign({}, prevState.selectedElementIds), {\n [draggingElement.id]: true\n }), prevState),\n selectedLinearElement: new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(draggingElement, this.scene)\n }));\n } else {\n this.setState(prevState => ({\n draggingElement: null\n }));\n }\n }\n\n return;\n }\n\n if (activeTool.type !== \"selection\" && draggingElement && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isInvisiblySmallElement)(draggingElement)) {\n // remove invisible element which was added in onPointerDown\n this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter(el => el.id !== draggingElement.id));\n this.setState({\n draggingElement: null\n });\n return;\n }\n\n if (draggingElement) {\n if (pointerDownState.drag.hasOccurred) {\n const sceneCoords = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)(childEvent, this.state); // when editing the points of a linear element, we check if the\n // linear element still is in the frame afterwards\n // if not, the linear element will be removed from its frame (if any)\n\n if (this.state.selectedLinearElement && this.state.selectedLinearElement.isDragging) {\n const linearElement = this.scene.getElement(this.state.selectedLinearElement.elementId);\n\n if (linearElement === null || linearElement === void 0 ? void 0 : linearElement.frameId) {\n const frame = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getContainingFrame)(linearElement);\n\n if (frame && linearElement) {\n if (!(0,_frame__WEBPACK_IMPORTED_MODULE_51__.elementOverlapsWithFrame)(linearElement, frame)) {\n // remove the linear element from all groups\n // before removing it from the frame as well\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(linearElement, {\n groupIds: []\n });\n this.scene.replaceAllElements((0,_frame__WEBPACK_IMPORTED_MODULE_51__.removeElementsFromFrame)(this.scene.getElementsIncludingDeleted(), [linearElement], this.state));\n }\n }\n }\n } else {\n // update the relationships between selected elements and frames\n const topLayerFrame = this.getTopLayerFrameAtSceneCoords(sceneCoords);\n const selectedElements = this.scene.getSelectedElements(this.state);\n let nextElements = this.scene.getElementsIncludingDeleted();\n\n const updateGroupIdsAfterEditingGroup = elements => {\n if (elements.length > 0) {\n for (const element of elements) {\n const index = element.groupIds.indexOf(this.state.editingGroupId);\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n groupIds: element.groupIds.slice(0, index)\n }, false);\n }\n\n nextElements.forEach(element => {\n if (element.groupIds.length && (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getElementsInGroup)(nextElements, element.groupIds[element.groupIds.length - 1]).length < 2) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(element, {\n groupIds: []\n }, false);\n }\n });\n this.setState({\n editingGroupId: null\n });\n }\n };\n\n if (topLayerFrame && !this.state.selectedElementIds[topLayerFrame.id]) {\n const elementsToAdd = selectedElements.filter(element => element.frameId !== topLayerFrame.id && (0,_frame__WEBPACK_IMPORTED_MODULE_51__.isElementInFrame)(element, nextElements, this.state));\n\n if (this.state.editingGroupId) {\n updateGroupIdsAfterEditingGroup(elementsToAdd);\n }\n\n nextElements = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.addElementsToFrame)(nextElements, elementsToAdd, topLayerFrame);\n } else if (!topLayerFrame) {\n if (this.state.editingGroupId) {\n const elementsToRemove = selectedElements.filter(element => element.frameId && !(0,_frame__WEBPACK_IMPORTED_MODULE_51__.isElementInFrame)(element, nextElements, this.state));\n updateGroupIdsAfterEditingGroup(elementsToRemove);\n }\n }\n\n nextElements = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.updateFrameMembershipOfSelectedElements)(nextElements, this.state, this);\n this.scene.replaceAllElements(nextElements);\n }\n }\n\n if (draggingElement.type === \"frame\") {\n const elementsInsideFrame = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getElementsInNewFrame)(this.scene.getElementsIncludingDeleted(), draggingElement);\n this.scene.replaceAllElements((0,_frame__WEBPACK_IMPORTED_MODULE_51__.addElementsToFrame)(this.scene.getElementsIncludingDeleted(), elementsInsideFrame, draggingElement));\n }\n\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement)(draggingElement, (0,_element__WEBPACK_IMPORTED_MODULE_16__.getNormalizedDimensions)(draggingElement));\n }\n\n if (resizingElement) {\n this.history.resumeRecording();\n }\n\n if (resizingElement && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isInvisiblySmallElement)(resizingElement)) {\n this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().filter(el => el.id !== resizingElement.id));\n } // handle frame membership for resizing frames and/or selected elements\n\n\n if (pointerDownState.resize.isResizing) {\n let nextElements = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.updateFrameMembershipOfSelectedElements)(this.scene.getElementsIncludingDeleted(), this.state, this);\n const selectedFrames = this.scene.getSelectedElements(this.state).filter(element => element.type === \"frame\");\n\n for (const frame of selectedFrames) {\n nextElements = (0,_frame__WEBPACK_IMPORTED_MODULE_51__.replaceAllElementsInFrame)(nextElements, (0,_frame__WEBPACK_IMPORTED_MODULE_51__.getElementsInResizingFrame)(this.scene.getElementsIncludingDeleted(), frame, this.state), frame, this.state);\n }\n\n this.scene.replaceAllElements(nextElements);\n } // Code below handles selection when element(s) weren't\n // drag or added to selection on pointer down phase.\n\n\n const hitElement = pointerDownState.hit.element;\n\n if (((_e = this.state.selectedLinearElement) === null || _e === void 0 ? void 0 : _e.elementId) !== (hitElement === null || hitElement === void 0 ? void 0 : hitElement.id) && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(hitElement)) {\n const selectedELements = this.scene.getSelectedElements(this.state); // set selectedLinearElement when no other element selected except\n // the one we've hit\n\n if (selectedELements.length === 1) {\n this.setState({\n selectedLinearElement: new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(hitElement, this.scene)\n });\n }\n }\n\n if ((0,_appState__WEBPACK_IMPORTED_MODULE_10__.isEraserActive)(this.state)) {\n const draggedDistance = (0,_math__WEBPACK_IMPORTED_MODULE_28__.distance2d)(this.lastPointerDownEvent.clientX, this.lastPointerDownEvent.clientY, this.lastPointerUpEvent.clientX, this.lastPointerUpEvent.clientY);\n\n if (draggedDistance === 0) {\n const scenePointer = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.viewportCoordsToSceneCoords)({\n clientX: this.lastPointerUpEvent.clientX,\n clientY: this.lastPointerUpEvent.clientY\n }, this.state);\n const hitElements = this.getElementsAtPosition(scenePointer.x, scenePointer.y);\n hitElements.forEach(hitElement => pointerDownState.elementIdsToErase[hitElement.id] = {\n erase: true,\n opacity: hitElement.opacity\n });\n }\n\n this.eraseElements(pointerDownState);\n return;\n } else if (Object.keys(pointerDownState.elementIdsToErase).length) {\n this.restoreReadyToEraseElements(pointerDownState);\n }\n\n if (hitElement && !pointerDownState.drag.hasOccurred && !pointerDownState.hit.wasAddedToSelection && ( // if we're editing a line, pointerup shouldn't switch selection if\n // box selected\n !this.state.editingLinearElement || !pointerDownState.boxSelection.hasOccurred)) {\n // when inside line editor, shift selects points instead\n if (childEvent.shiftKey && !this.state.editingLinearElement) {\n if (this.state.selectedElementIds[hitElement.id]) {\n if ((0,_groups__WEBPACK_IMPORTED_MODULE_23__.isSelectedViaGroup)(this.state, hitElement)) {\n this.setState(_prevState => {\n const nextSelectedElementIds = Object.assign({}, _prevState.selectedElementIds); // We want to unselect all groups hitElement is part of\n // as well as all elements that are part of the groups\n // hitElement is part of\n\n for (const groupedElement of hitElement.groupIds.flatMap(groupId => (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getElementsInGroup)(this.scene.getNonDeletedElements(), groupId))) {\n delete nextSelectedElementIds[groupedElement.id];\n }\n\n return {\n selectedGroupIds: Object.assign(Object.assign({}, _prevState.selectedElementIds), hitElement.groupIds.map(gId => ({\n [gId]: false\n })).reduce((prev, acc) => Object.assign(Object.assign({}, prev), acc), {})),\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(nextSelectedElementIds, _prevState)\n };\n }); // if not gragging a linear element point (outside editor)\n } else if (!((_f = this.state.selectedLinearElement) === null || _f === void 0 ? void 0 : _f.isDragging)) {\n // remove element from selection while\n // keeping prev elements selected\n this.setState(prevState => {\n const newSelectedElementIds = Object.assign({}, prevState.selectedElementIds);\n delete newSelectedElementIds[hitElement.id];\n const newSelectedElements = (0,_scene__WEBPACK_IMPORTED_MODULE_29__.getSelectedElements)(this.scene.getNonDeletedElements(), {\n selectedElementIds: newSelectedElementIds\n });\n return Object.assign(Object.assign({}, (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: prevState.editingGroupId,\n selectedElementIds: newSelectedElementIds\n }, this.scene.getNonDeletedElements(), prevState, this)), {\n // set selectedLinearElement only if thats the only element selected\n selectedLinearElement: newSelectedElements.length === 1 && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(newSelectedElements[0]) ? new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(newSelectedElements[0], this.scene) : prevState.selectedLinearElement\n });\n });\n }\n } else if (hitElement.frameId && this.state.selectedElementIds[hitElement.frameId]) {\n // when hitElement is part of a selected frame, deselect the frame\n // to avoid frame and containing elements selected simultaneously\n this.setState(prevState => {\n var _a, _b;\n\n const nextSelectedElementIds = Object.assign(Object.assign({}, prevState.selectedElementIds), {\n [hitElement.id]: true\n }); // deselect the frame\n\n delete nextSelectedElementIds[hitElement.frameId]; // deselect groups containing the frame\n\n ((_b = (_a = this.scene.getElement(hitElement.frameId)) === null || _a === void 0 ? void 0 : _a.groupIds) !== null && _b !== void 0 ? _b : []).flatMap(gid => (0,_groups__WEBPACK_IMPORTED_MODULE_23__.getElementsInGroup)(this.scene.getNonDeletedElements(), gid)).forEach(element => {\n delete nextSelectedElementIds[element.id];\n });\n return Object.assign(Object.assign({}, (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: prevState.editingGroupId,\n selectedElementIds: nextSelectedElementIds\n }, this.scene.getNonDeletedElements(), prevState, this)), {\n showHyperlinkPopup: hitElement.link || (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement) ? \"info\" : false\n });\n });\n } else {\n // add element to selection while keeping prev elements selected\n this.setState(_prevState => ({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.assign(Object.assign({}, _prevState.selectedElementIds), {\n [hitElement.id]: true\n }), _prevState)\n }));\n }\n } else {\n this.setState(prevState => {\n var _a;\n\n return Object.assign(Object.assign({}, (0,_groups__WEBPACK_IMPORTED_MODULE_23__.selectGroupsForSelectedElements)({\n editingGroupId: prevState.editingGroupId,\n selectedElementIds: {\n [hitElement.id]: true\n }\n }, this.scene.getNonDeletedElements(), prevState, this)), {\n selectedLinearElement: (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isLinearElement)(hitElement) && // Don't set `selectedLinearElement` if its same as the hitElement, this is mainly to prevent resetting the `hoverPointIndex` to -1.\n // Future we should update the API to take care of setting the correct `hoverPointIndex` when initialized\n ((_a = prevState.selectedLinearElement) === null || _a === void 0 ? void 0 : _a.elementId) !== hitElement.id ? new _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_18__.LinearElementEditor(hitElement, this.scene) : prevState.selectedLinearElement\n });\n });\n }\n }\n\n if (!pointerDownState.drag.hasOccurred && !this.state.isResizing && (hitElement && (0,_element__WEBPACK_IMPORTED_MODULE_16__.isHittingElementBoundingBoxWithoutHittingElement)(hitElement, this.state, this.frameNameBoundsCache, pointerDownState.origin.x, pointerDownState.origin.y) || !hitElement && pointerDownState.hit.hasHitCommonBoundingBoxOfSelectedElements)) {\n if (this.state.editingLinearElement) {\n this.setState({\n editingLinearElement: null\n });\n } else {\n // Deselect selected elements\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n selectedGroupIds: {},\n editingGroupId: null,\n activeEmbeddable: null\n });\n }\n\n return;\n }\n\n if (!activeTool.locked && activeTool.type !== \"freedraw\" && draggingElement && draggingElement.type !== \"selection\") {\n this.setState(prevState => ({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)(Object.assign(Object.assign({}, prevState.selectedElementIds), {\n [draggingElement.id]: true\n }), prevState),\n showHyperlinkPopup: (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(draggingElement) && !draggingElement.link ? \"editor\" : prevState.showHyperlinkPopup\n }));\n }\n\n if (activeTool.type !== \"selection\" || (0,_scene__WEBPACK_IMPORTED_MODULE_29__.isSomeElementSelected)(this.scene.getNonDeletedElements(), this.state)) {\n this.history.resumeRecording();\n }\n\n if (pointerDownState.drag.hasOccurred || isResizing || isRotating) {\n ((0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.isBindingEnabled)(this.state) ? _element_binding__WEBPACK_IMPORTED_MODULE_17__.bindOrUnbindSelectedElements : _element_binding__WEBPACK_IMPORTED_MODULE_17__.unbindLinearElements)(this.scene.getSelectedElements(this.state));\n }\n\n if (activeTool.type === \"laser\") {\n this.laserPathManager.endPath();\n return;\n }\n\n if (!activeTool.locked && activeTool.type !== \"freedraw\") {\n (0,_utils__WEBPACK_IMPORTED_MODULE_33__.resetCursor)(this.interactiveCanvas);\n this.setState({\n draggingElement: null,\n suggestedBindings: [],\n activeTool: (0,_utils__WEBPACK_IMPORTED_MODULE_33__.updateActiveTool)(this.state, {\n type: \"selection\"\n })\n });\n } else {\n this.setState({\n draggingElement: null,\n suggestedBindings: []\n });\n }\n\n if (hitElement && this.lastPointerUpEvent && this.lastPointerDownEvent && this.lastPointerUpEvent.timeStamp - this.lastPointerDownEvent.timeStamp < 300 && gesture.pointers.size <= 1 && (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isEmbeddableElement)(hitElement) && this.isEmbeddableCenter(hitElement, this.lastPointerUpEvent, pointerDownState.origin.x, pointerDownState.origin.y)) {\n this.handleEmbeddableCenterClick(hitElement);\n }\n });\n }\n\n maybeSuggestBindingForAll(selectedElements) {\n if (selectedElements.length > 50) {\n return;\n }\n\n const suggestedBindings = (0,_element_binding__WEBPACK_IMPORTED_MODULE_17__.getEligibleElementsForBinding)(selectedElements);\n this.setState({\n suggestedBindings\n });\n }\n\n setSelection(elements) {\n const selectedElementIds = {};\n const selectedGroupIds = {};\n elements.forEach(ele => {\n if (ele.groupIds.length) {\n selectedElementIds[ele.id] = true;\n ele.groupIds.forEach(id => {\n selectedGroupIds[id] = true;\n });\n } // exclude bound text elements as we don't mark them as selected when\n // container is selected unless in group\n else if (!(0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_21__.isBoundToContainer)(ele)) {\n selectedElementIds[ele.id] = true;\n }\n });\n this.setState({\n previousSelectedElementIds: this.state.selectedElementIds,\n selectedElementIds,\n selectedGroupIds\n });\n }\n\n clearSelection(hitElement) {\n this.setState(prevState => ({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, prevState),\n activeEmbeddable: null,\n selectedGroupIds: {},\n // Continue editing the same group if the user selected a different\n // element from it\n editingGroupId: prevState.editingGroupId && hitElement != null && (0,_groups__WEBPACK_IMPORTED_MODULE_23__.isElementInGroup)(hitElement, prevState.editingGroupId) ? prevState.editingGroupId : null\n }));\n this.setState({\n selectedElementIds: (0,_scene_selection__WEBPACK_IMPORTED_MODULE_52__.makeNextSelectedElementIds)({}, this.state),\n activeEmbeddable: null,\n previousSelectedElementIds: this.state.selectedElementIds\n });\n }\n\n getTextWysiwygSnappedToCenterPosition(x, y, appState, container) {\n if (container) {\n let elementCenterX = container.x + container.width / 2;\n let elementCenterY = container.y + container.height / 2;\n const elementCenter = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_43__.getContainerCenter)(container, appState);\n\n if (elementCenter) {\n elementCenterX = elementCenter.x;\n elementCenterY = elementCenter.y;\n }\n\n const distanceToCenter = Math.hypot(x - elementCenterX, y - elementCenterY);\n const isSnappedToCenter = distanceToCenter < _constants__WEBPACK_IMPORTED_MODULE_12__.TEXT_TO_CENTER_SNAP_THRESHOLD;\n\n if (isSnappedToCenter) {\n const {\n x: viewportX,\n y: viewportY\n } = (0,_utils__WEBPACK_IMPORTED_MODULE_33__.sceneCoordsToViewportCoords)({\n sceneX: elementCenterX,\n sceneY: elementCenterY\n }, appState);\n return {\n viewportX,\n viewportY,\n elementCenterX,\n elementCenterY\n };\n }\n }\n }\n\n getCanvasOffsets() {\n var _a;\n\n if ((_a = this.excalidrawContainerRef) === null || _a === void 0 ? void 0 : _a.current) {\n const excalidrawContainer = this.excalidrawContainerRef.current;\n const {\n left,\n top\n } = excalidrawContainer.getBoundingClientRect();\n return {\n offsetLeft: left,\n offsetTop: top\n };\n }\n\n return {\n offsetLeft: 0,\n offsetTop: 0\n };\n }\n\n async updateLanguage() {\n const currentLang = _i18n__WEBPACK_IMPORTED_MODULE_25__.languages.find(lang => lang.code === this.props.langCode) || _i18n__WEBPACK_IMPORTED_MODULE_25__.defaultLang;\n await (0,_i18n__WEBPACK_IMPORTED_MODULE_25__.setLanguage)(currentLang);\n this.setAppState({});\n }\n\n}\n\nApp.defaultProps = {\n // needed for tests to pass since we directly render App in many tests\n UIOptions: _constants__WEBPACK_IMPORTED_MODULE_12__.DEFAULT_UI_OPTIONS\n};\n\nif (\"development\" === _constants__WEBPACK_IMPORTED_MODULE_12__.ENV.TEST || \"development\" !== \"production\") {\n window.h = window.h || {};\n Object.defineProperties(window.h, {\n elements: {\n configurable: true,\n\n get() {\n var _a;\n\n return (_a = this.app) === null || _a === void 0 ? void 0 : _a.scene.getElementsIncludingDeleted();\n },\n\n set(elements) {\n var _a;\n\n return (_a = this.app) === null || _a === void 0 ? void 0 : _a.scene.replaceAllElements(elements);\n }\n\n }\n });\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (App);\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/App.tsx?");
2263
2285
 
2264
2286
  /***/ }),
2265
2287
 
@@ -2600,7 +2622,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
2600
2622
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2601
2623
 
2602
2624
  "use strict";
2603
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"HelpDialog\": () => (/* binding */ HelpDialog)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../keys */ \"../../keys.ts\");\n/* harmony import */ var _Dialog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Dialog */ \"../../components/Dialog.tsx\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _HelpDialog_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./HelpDialog.scss */ \"../../components/HelpDialog.scss\");\n/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./icons */ \"../../components/icons.tsx\");\n/* harmony import */ var _clipboard__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../clipboard */ \"../../clipboard.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\n\n\n\n\n\n\n\n\n\n\n\nconst Header = () => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"HelpDialog__header\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"a\", Object.assign({\n className: \"HelpDialog__btn\" //zsviczian\n ,\n href: \"https://github.com/zsviczian/obsidian-excalidraw-plugin/#readme\",\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, {\n children: [(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.documentation\"), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"HelpDialog__link-icon\"\n }, {\n children: _icons__WEBPACK_IMPORTED_MODULE_7__.ExternalLinkIcon\n }))]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"a\", Object.assign({\n className: \"HelpDialog__btn\",\n href: \"https://www.youtube.com/@VisualPKM\" //zsviczian\n ,\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, {\n children: [\"Visual PKM YouTube\", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"HelpDialog__link-icon\"\n }, {\n children: _icons__WEBPACK_IMPORTED_MODULE_7__.ExternalLinkIcon\n }))]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"a\", Object.assign({\n className: \"HelpDialog__btn\" //zsviczian\n ,\n href: \"https://github.com/zsviczian/obsidian-excalidraw-plugin/issues\",\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, {\n children: [(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.github\"), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"HelpDialog__link-icon\"\n }, {\n children: _icons__WEBPACK_IMPORTED_MODULE_7__.ExternalLinkIcon\n }))]\n }))]\n}));\n\nconst Section = props => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"h3\", {\n children: props.title\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"HelpDialog__islands-container\"\n }, {\n children: props.children\n }))]\n});\n\nconst ShortcutIsland = props => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: `HelpDialog__island ${props.className}`\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"h4\", Object.assign({\n className: \"HelpDialog__island-title\"\n }, {\n children: props.caption\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"HelpDialog__island-content\"\n }, {\n children: props.children\n }))]\n}));\n\nfunction* intersperse(as, delim) {\n let first = true;\n\n for (const x of as) {\n if (!first) {\n yield delim;\n }\n\n first = false;\n yield x;\n }\n}\n\nconst upperCaseSingleChars = str => {\n return str.replace(/\\b[a-z]\\b/, c => c.toUpperCase());\n};\n\nconst Shortcut = ({\n label,\n shortcuts,\n isOr = true\n}) => {\n const splitShortcutKeys = shortcuts.map(shortcut => {\n const keys = shortcut.endsWith(\"++\") ? [...shortcut.slice(0, -2).split(\"+\"), \"+\"] : shortcut.split(\"+\");\n return keys.map(key => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ShortcutKey, {\n children: upperCaseSingleChars(key)\n }, key));\n });\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"HelpDialog__shortcut\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n children: label\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"HelpDialog__key-container\"\n }, {\n children: [...intersperse(splitShortcutKeys, isOr ? (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.or\") : null)]\n }))]\n }));\n};\n\nconst ShortcutKey = props => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"kbd\", Object.assign({\n className: \"HelpDialog__key\"\n}, props));\n\nconst HelpDialog = ({\n onClose\n}) => {\n const handleClose = react__WEBPACK_IMPORTED_MODULE_1___default().useCallback(() => {\n if (onClose) {\n onClose();\n }\n }, [onClose]);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Dialog__WEBPACK_IMPORTED_MODULE_4__.Dialog, Object.assign({\n onCloseRequest: handleClose,\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.title\"),\n className: \"HelpDialog\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Header, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(Section, Object.assign({\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.shortcuts\")\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ShortcutIsland, Object.assign({\n className: \"HelpDialog__island--tools\",\n caption: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.tools\")\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.hand\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.H]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.selection\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.V, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[1]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.rectangle\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.R, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[2]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.diamond\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.D, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[3]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.ellipse\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.O, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[4]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.arrow\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.A, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[5]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.line\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.L, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[6]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.freedraw\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.P, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[7]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.text\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.T, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[8]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.image\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[9]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.eraser\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.E, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[0]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.frame\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.F]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.eyeDropper\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.I, \"Shift+S\", \"Shift+G\"]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.editLineArrowPoints\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Enter\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.editText\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Enter\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.textNewLine\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Enter\"), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Shift+Enter\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.textFinish\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Esc\"), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Enter\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.curvedArrow\"),\n shortcuts: [\"A\", (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\"), (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\"), (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\")],\n isOr: false\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.curvedLine\"),\n shortcuts: [\"L\", (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\"), (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\"), (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\")],\n isOr: false\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.lock\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.Q]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.preventBinding\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.link\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+K\")]\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ShortcutIsland, Object.assign({\n className: \"HelpDialog__island--view\",\n caption: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.view\")\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.zoomIn\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd++\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.zoomOut\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+-\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.resetZoom\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+0\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.zoomToFit\"),\n shortcuts: [\"Shift+1\"]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.zoomToSelection\"),\n shortcuts: [\"Shift+2\"]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.movePageUpDown\"),\n shortcuts: [\"PgUp/PgDn\"]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.movePageLeftRight\"),\n shortcuts: [\"Shift+PgUp/PgDn\"]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut //zsviczian\n , {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.fullScreen\"),\n shortcuts: [\"F11 + Command Palette Action\"]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.zenMode\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Alt+Z\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.objectsSnapMode\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Alt+S\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.showGrid\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+'\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.viewMode\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Alt+R\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.toggleTheme\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Alt+Shift+D\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"stats.title\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Alt+/\")]\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ShortcutIsland, Object.assign({\n className: \"HelpDialog__island--editor\",\n caption: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.editor\")\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.moveCanvas\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(`Space+${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.drag\")}`), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(`Wheel+${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.drag\")}`)],\n isOr: true\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.clearReset\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Delete\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.delete\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Delete\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.cut\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+X\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.copy\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+C\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.paste\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+V\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.pasteAsPlaintext\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+V\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.selectAll\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+A\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.multiSelect\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(`Shift+${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\")}`)]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.deepSelect\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(`CtrlOrCmd+${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\")}`)]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.deepBoxSelect\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(`CtrlOrCmd+${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.drag\")}`)]\n }), (_clipboard__WEBPACK_IMPORTED_MODULE_8__.probablySupportsClipboardBlob || _constants__WEBPACK_IMPORTED_MODULE_9__.isFirefox) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.copyAsPng\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Shift+Alt+C\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.copyStyles\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Alt+C\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.pasteStyles\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Alt+V\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.sendToBack\"),\n shortcuts: [_constants__WEBPACK_IMPORTED_MODULE_9__.isDarwin ? (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Alt+[\") : (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+[\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.bringToFront\"),\n shortcuts: [_constants__WEBPACK_IMPORTED_MODULE_9__.isDarwin ? (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Alt+]\") : (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+]\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.sendBackward\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+[\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.bringForward\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+]\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.alignTop\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+Up\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.alignBottom\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+Down\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.alignLeft\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+Left\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.alignRight\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+Right\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.duplicateSelection\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+D\"), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(`Alt+${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.drag\")}`)]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.toggleElementLock\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+L\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.undo\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Z\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.redo\"),\n shortcuts: _constants__WEBPACK_IMPORTED_MODULE_9__.isWindows ? [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Y\"), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+Z\")] : [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+Z\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.group\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+G\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.ungroup\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+G\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.flipHorizontal\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Shift+H\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.flipVertical\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Shift+V\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.showStroke\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"S\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.showBackground\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"G\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.decreaseFontSize\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+<\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.increaseFontSize\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+>\")]\n })]\n }))]\n }))]\n }))\n });\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/HelpDialog.tsx?");
2625
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"HelpDialog\": () => (/* binding */ HelpDialog)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../keys */ \"../../keys.ts\");\n/* harmony import */ var _Dialog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Dialog */ \"../../components/Dialog.tsx\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _HelpDialog_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./HelpDialog.scss */ \"../../components/HelpDialog.scss\");\n/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./icons */ \"../../components/icons.tsx\");\n/* harmony import */ var _clipboard__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../clipboard */ \"../../clipboard.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\n\n\n\n\n\n\n\n\n\n\n\nconst Header = () => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"HelpDialog__header\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"a\", Object.assign({\n className: \"HelpDialog__btn\" //zsviczian\n ,\n href: \"https://github.com/zsviczian/obsidian-excalidraw-plugin/#readme\",\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, {\n children: [(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.documentation\"), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"HelpDialog__link-icon\"\n }, {\n children: _icons__WEBPACK_IMPORTED_MODULE_7__.ExternalLinkIcon\n }))]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"a\", Object.assign({\n className: \"HelpDialog__btn\",\n href: \"https://www.youtube.com/@VisualPKM\" //zsviczian\n ,\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, {\n children: [\"Visual PKM YouTube\", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"HelpDialog__link-icon\"\n }, {\n children: _icons__WEBPACK_IMPORTED_MODULE_7__.ExternalLinkIcon\n }))]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"a\", Object.assign({\n className: \"HelpDialog__btn\" //zsviczian\n ,\n href: \"https://github.com/zsviczian/obsidian-excalidraw-plugin/issues\",\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }, {\n children: [(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.github\"), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"HelpDialog__link-icon\"\n }, {\n children: _icons__WEBPACK_IMPORTED_MODULE_7__.ExternalLinkIcon\n }))]\n }))]\n}));\n\nconst Section = props => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"h3\", {\n children: props.title\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"HelpDialog__islands-container\"\n }, {\n children: props.children\n }))]\n});\n\nconst ShortcutIsland = props => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: `HelpDialog__island ${props.className}`\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"h4\", Object.assign({\n className: \"HelpDialog__island-title\"\n }, {\n children: props.caption\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"HelpDialog__island-content\"\n }, {\n children: props.children\n }))]\n}));\n\nfunction* intersperse(as, delim) {\n let first = true;\n\n for (const x of as) {\n if (!first) {\n yield delim;\n }\n\n first = false;\n yield x;\n }\n}\n\nconst upperCaseSingleChars = str => {\n return str.replace(/\\b[a-z]\\b/, c => c.toUpperCase());\n};\n\nconst Shortcut = ({\n label,\n shortcuts,\n isOr = true\n}) => {\n const splitShortcutKeys = shortcuts.map(shortcut => {\n const keys = shortcut.endsWith(\"++\") ? [...shortcut.slice(0, -2).split(\"+\"), \"+\"] : shortcut.split(\"+\");\n return keys.map(key => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ShortcutKey, {\n children: upperCaseSingleChars(key)\n }, key));\n });\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"HelpDialog__shortcut\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n children: label\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"HelpDialog__key-container\"\n }, {\n children: [...intersperse(splitShortcutKeys, isOr ? (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.or\") : null)]\n }))]\n }));\n};\n\nconst ShortcutKey = props => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"kbd\", Object.assign({\n className: \"HelpDialog__key\"\n}, props));\n\nconst HelpDialog = ({\n onClose\n}) => {\n const handleClose = react__WEBPACK_IMPORTED_MODULE_1___default().useCallback(() => {\n if (onClose) {\n onClose();\n }\n }, [onClose]);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Dialog__WEBPACK_IMPORTED_MODULE_4__.Dialog, Object.assign({\n onCloseRequest: handleClose,\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.title\"),\n className: \"HelpDialog\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Header, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(Section, Object.assign({\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.shortcuts\")\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ShortcutIsland, Object.assign({\n className: \"HelpDialog__island--tools\",\n caption: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.tools\")\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.hand\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.H]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.selection\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.V, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[1]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.rectangle\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.R, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[2]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.diamond\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.D, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[3]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.ellipse\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.O, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[4]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.arrow\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.A, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[5]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.line\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.L, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[6]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.freedraw\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.P, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[7]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.text\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.T, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[8]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.image\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[9]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.eraser\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.E, _keys__WEBPACK_IMPORTED_MODULE_3__.KEYS[0]]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.frame\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.F]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.laser\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.K]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.eyeDropper\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.I, \"Shift+S\", \"Shift+G\"]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.editLineArrowPoints\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Enter\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.editText\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Enter\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.textNewLine\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Enter\"), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Shift+Enter\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.textFinish\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Esc\"), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Enter\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.curvedArrow\"),\n shortcuts: [\"A\", (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\"), (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\"), (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\")],\n isOr: false\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.curvedLine\"),\n shortcuts: [\"L\", (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\"), (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\"), (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\")],\n isOr: false\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.lock\"),\n shortcuts: [_keys__WEBPACK_IMPORTED_MODULE_3__.KEYS.Q]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.preventBinding\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.link\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+K\")]\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ShortcutIsland, Object.assign({\n className: \"HelpDialog__island--view\",\n caption: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.view\")\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.zoomIn\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd++\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.zoomOut\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+-\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.resetZoom\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+0\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.zoomToFit\"),\n shortcuts: [\"Shift+1\"]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.zoomToSelection\"),\n shortcuts: [\"Shift+2\"]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.movePageUpDown\"),\n shortcuts: [\"PgUp/PgDn\"]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.movePageLeftRight\"),\n shortcuts: [\"Shift+PgUp/PgDn\"]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut //zsviczian\n , {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.fullScreen\"),\n shortcuts: [\"F11 + Command Palette Action\"]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.zenMode\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Alt+Z\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.objectsSnapMode\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Alt+S\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.showGrid\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+'\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.viewMode\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Alt+R\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.toggleTheme\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Alt+Shift+D\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"stats.title\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Alt+/\")]\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ShortcutIsland, Object.assign({\n className: \"HelpDialog__island--editor\",\n caption: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.editor\")\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.moveCanvas\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(`Space+${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.drag\")}`), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(`Wheel+${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.drag\")}`)],\n isOr: true\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.clearReset\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Delete\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.delete\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Delete\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.cut\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+X\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.copy\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+C\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.paste\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+V\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.pasteAsPlaintext\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+V\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.selectAll\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+A\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.multiSelect\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(`Shift+${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\")}`)]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.deepSelect\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(`CtrlOrCmd+${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.click\")}`)]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.deepBoxSelect\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(`CtrlOrCmd+${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.drag\")}`)]\n }), (_clipboard__WEBPACK_IMPORTED_MODULE_8__.probablySupportsClipboardBlob || _constants__WEBPACK_IMPORTED_MODULE_9__.isFirefox) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.copyAsPng\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Shift+Alt+C\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.copyStyles\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Alt+C\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.pasteStyles\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Alt+V\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.sendToBack\"),\n shortcuts: [_constants__WEBPACK_IMPORTED_MODULE_9__.isDarwin ? (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Alt+[\") : (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+[\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.bringToFront\"),\n shortcuts: [_constants__WEBPACK_IMPORTED_MODULE_9__.isDarwin ? (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Alt+]\") : (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+]\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.sendBackward\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+[\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.bringForward\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+]\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.alignTop\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+Up\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.alignBottom\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+Down\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.alignLeft\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+Left\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.alignRight\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+Right\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.duplicateSelection\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+D\"), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(`Alt+${(0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.drag\")}`)]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"helpDialog.toggleElementLock\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+L\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.undo\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Z\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.redo\"),\n shortcuts: _constants__WEBPACK_IMPORTED_MODULE_9__.isWindows ? [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Y\"), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+Z\")] : [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+Z\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.group\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+G\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.ungroup\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+G\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.flipHorizontal\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Shift+H\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.flipVertical\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"Shift+V\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.showStroke\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"S\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.showBackground\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"G\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.decreaseFontSize\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+<\")]\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Shortcut, {\n label: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"labels.increaseFontSize\"),\n shortcuts: [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.getShortcutKey)(\"CtrlOrCmd+Shift+>\")]\n })]\n }))]\n }))]\n }))\n });\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/HelpDialog.tsx?");
2604
2626
 
2605
2627
  /***/ }),
2606
2628
 
@@ -2670,6 +2692,39 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
2670
2692
 
2671
2693
  /***/ }),
2672
2694
 
2695
+ /***/ "../../components/LaserTool/LaserPathManager.ts":
2696
+ /*!******************************************************!*\
2697
+ !*** ../../components/LaserTool/LaserPathManager.ts ***!
2698
+ \******************************************************/
2699
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2700
+
2701
+ "use strict";
2702
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LaserPathManager\": () => (/* binding */ LaserPathManager)\n/* harmony export */ });\n/* harmony import */ var _excalidraw_laser_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @excalidraw/laser-pointer */ \"../../../node_modules/@excalidraw/laser-pointer/dist/esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ \"../../utils.ts\");\n/* harmony import */ var _clients__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../clients */ \"../../clients.ts\");\n\n\n // decay time in milliseconds\n\nconst DECAY_TIME = 1000; // length of line in points before it starts decaying\n\nconst DECAY_LENGTH = 50;\n\nconst average = (a, b) => (a + b) / 2;\n\nfunction getSvgPathFromStroke(points, closed = true) {\n const len = points.length;\n\n if (len < 4) {\n return ``;\n }\n\n let a = points[0];\n let b = points[1];\n const c = points[2];\n let result = `M${a[0].toFixed(2)},${a[1].toFixed(2)} Q${b[0].toFixed(2)},${b[1].toFixed(2)} ${average(b[0], c[0]).toFixed(2)},${average(b[1], c[1]).toFixed(2)} T`;\n\n for (let i = 2, max = len - 1; i < max; i++) {\n a = points[i];\n b = points[i + 1];\n result += `${average(a[0], b[0]).toFixed(2)},${average(a[1], b[1]).toFixed(2)} `;\n }\n\n if (closed) {\n result += \"Z\";\n }\n\n return result;\n}\n\nfunction easeOutCubic(t) {\n return 1 - Math.pow(1 - t, 3);\n}\n\nfunction instantiateCollabolatorState() {\n return {\n currentPath: undefined,\n finishedPaths: [],\n lastPoint: [-10000, -10000],\n svg: document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\")\n };\n}\n\nfunction instantiatePath() {\n _excalidraw_laser_pointer__WEBPACK_IMPORTED_MODULE_0__.LaserPointer.constants.cornerDetectionMaxAngle = 70;\n return new _excalidraw_laser_pointer__WEBPACK_IMPORTED_MODULE_0__.LaserPointer({\n simplify: 0,\n streamline: 0.4,\n sizeMapping: c => {\n const pt = DECAY_TIME;\n const pl = DECAY_LENGTH;\n const t = Math.max(0, 1 - (performance.now() - c.pressure) / pt);\n const l = (pl - Math.min(pl, c.totalLength - c.currentIndex)) / pl;\n return Math.min(easeOutCubic(l), easeOutCubic(t));\n }\n });\n}\n\nclass LaserPathManager {\n constructor(app) {\n this.app = app;\n this.collaboratorsState = new Map();\n this.isDrawing = false;\n this.isRunning = false;\n this.ownState = instantiateCollabolatorState();\n }\n\n destroy() {\n this.stop();\n this.isDrawing = false;\n this.ownState = instantiateCollabolatorState();\n this.collaboratorsState = new Map();\n }\n\n startPath(x, y) {\n if (this.container) {\n //zsviczian (fix offset)\n this.container.style.top = \"0px\";\n this.container.style.left = \"0px\";\n const {\n x,\n y\n } = this.container.getBoundingClientRect();\n this.container.style.top = `${-y}px`;\n this.container.style.left = `${-x}px`;\n }\n\n this.ownState.currentPath = instantiatePath();\n this.ownState.currentPath.addPoint([x, y, performance.now()]);\n this.updatePath(this.ownState);\n }\n\n addPointToPath(x, y) {\n var _a;\n\n if (this.ownState.currentPath) {\n (_a = this.ownState.currentPath) === null || _a === void 0 ? void 0 : _a.addPoint([x, y, performance.now()]);\n this.updatePath(this.ownState);\n }\n }\n\n endPath() {\n if (this.ownState.currentPath) {\n this.ownState.currentPath.close();\n this.ownState.finishedPaths.push(this.ownState.currentPath);\n this.updatePath(this.ownState);\n }\n }\n\n updatePath(state) {\n this.isDrawing = true;\n\n if (!this.isRunning) {\n this.start();\n }\n }\n\n start(svg) {\n if (svg) {\n this.container = svg;\n this.container.appendChild(this.ownState.svg);\n }\n\n this.stop();\n this.isRunning = true;\n this.loop();\n }\n\n stop() {\n this.isRunning = false;\n\n if (this.rafId) {\n cancelAnimationFrame(this.rafId);\n }\n\n this.rafId = undefined;\n }\n\n loop() {\n this.rafId = requestAnimationFrame(this.loop.bind(this));\n this.updateCollabolatorsState();\n\n if (this.isDrawing) {\n this.update();\n } else {\n this.isRunning = false;\n }\n }\n\n draw(path) {\n const stroke = path.getStrokeOutline(path.options.size / this.app.state.zoom.value).map(([x, y]) => {\n const result = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.sceneCoordsToViewportCoords)({\n sceneX: x,\n sceneY: y\n }, this.app.state);\n return [result.x, result.y];\n });\n return getSvgPathFromStroke(stroke, true);\n }\n\n updateCollabolatorsState() {\n if (!this.container || !this.app.state.collaborators.size) {\n return;\n }\n\n for (const [key, collabolator] of this.app.state.collaborators.entries()) {\n if (!this.collaboratorsState.has(key)) {\n const state = instantiateCollabolatorState();\n this.container.appendChild(state.svg);\n this.collaboratorsState.set(key, state);\n this.updatePath(state);\n }\n\n const state = this.collaboratorsState.get(key);\n\n if (collabolator.pointer && collabolator.pointer.tool === \"laser\") {\n if (collabolator.button === \"down\" && state.currentPath === undefined) {\n state.lastPoint = [collabolator.pointer.x, collabolator.pointer.y];\n state.currentPath = instantiatePath();\n state.currentPath.addPoint([collabolator.pointer.x, collabolator.pointer.y, performance.now()]);\n this.updatePath(state);\n }\n\n if (collabolator.button === \"down\" && state.currentPath !== undefined) {\n if (collabolator.pointer.x !== state.lastPoint[0] || collabolator.pointer.y !== state.lastPoint[1]) {\n state.lastPoint = [collabolator.pointer.x, collabolator.pointer.y];\n state.currentPath.addPoint([collabolator.pointer.x, collabolator.pointer.y, performance.now()]);\n this.updatePath(state);\n }\n }\n\n if (collabolator.button === \"up\" && state.currentPath !== undefined) {\n state.lastPoint = [collabolator.pointer.x, collabolator.pointer.y];\n state.currentPath.addPoint([collabolator.pointer.x, collabolator.pointer.y, performance.now()]);\n state.currentPath.close();\n state.finishedPaths.push(state.currentPath);\n state.currentPath = undefined;\n this.updatePath(state);\n }\n }\n }\n }\n\n update() {\n if (!this.container) {\n return;\n }\n\n let somePathsExist = false;\n\n for (const [key, state] of this.collaboratorsState.entries()) {\n if (!this.app.state.collaborators.has(key)) {\n state.svg.remove();\n this.collaboratorsState.delete(key);\n continue;\n }\n\n state.finishedPaths = state.finishedPaths.filter(path => {\n const lastPoint = path.originalPoints[path.originalPoints.length - 1];\n return !(lastPoint && lastPoint[2] < performance.now() - DECAY_TIME);\n });\n let paths = state.finishedPaths.map(path => this.draw(path)).join(\" \");\n\n if (state.currentPath) {\n paths += ` ${this.draw(state.currentPath)}`;\n }\n\n if (paths.trim()) {\n somePathsExist = true;\n }\n\n state.svg.setAttribute(\"d\", paths);\n state.svg.setAttribute(\"fill\", (0,_clients__WEBPACK_IMPORTED_MODULE_2__.getClientColor)(key));\n }\n\n this.ownState.finishedPaths = this.ownState.finishedPaths.filter(path => {\n const lastPoint = path.originalPoints[path.originalPoints.length - 1];\n return !(lastPoint && lastPoint[2] < performance.now() - DECAY_TIME);\n });\n let paths = this.ownState.finishedPaths.map(path => this.draw(path)).join(\" \");\n\n if (this.ownState.currentPath) {\n paths += ` ${this.draw(this.ownState.currentPath)}`;\n }\n\n paths = paths.trim();\n\n if (paths) {\n somePathsExist = true;\n }\n\n this.ownState.svg.setAttribute(\"d\", paths);\n this.ownState.svg.setAttribute(\"fill\", \"red\");\n\n if (!somePathsExist) {\n this.isDrawing = false;\n }\n }\n\n}\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/LaserTool/LaserPathManager.ts?");
2703
+
2704
+ /***/ }),
2705
+
2706
+ /***/ "../../components/LaserTool/LaserPointerButton.tsx":
2707
+ /*!*********************************************************!*\
2708
+ !*** ../../components/LaserTool/LaserPointerButton.tsx ***!
2709
+ \*********************************************************/
2710
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2711
+
2712
+ "use strict";
2713
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LaserPointerButton\": () => (/* binding */ LaserPointerButton)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _ToolIcon_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ToolIcon.scss */ \"../../components/ToolIcon.scss\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ \"../../../node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icons */ \"../../components/icons.tsx\");\n\n\n\n\nconst DEFAULT_SIZE = \"small\";\nconst LaserPointerButton = props => {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"label\", Object.assign({\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\"ToolIcon ToolIcon__LaserPointer\", `ToolIcon_size_${DEFAULT_SIZE}`, {\n \"is-mobile\": props.isMobile\n }),\n title: `${props.title}`\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"input\", {\n className: \"ToolIcon_type_checkbox\",\n type: \"checkbox\",\n name: props.name,\n onChange: props.onChange,\n checked: props.checked,\n \"aria-label\": props.title,\n \"data-testid\": \"toolbar-LaserPointer\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"ToolIcon__icon\"\n }, {\n children: _icons__WEBPACK_IMPORTED_MODULE_3__.laserPointerToolIcon\n }))]\n }));\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/LaserTool/LaserPointerButton.tsx?");
2714
+
2715
+ /***/ }),
2716
+
2717
+ /***/ "../../components/LaserTool/LaserTool.tsx":
2718
+ /*!************************************************!*\
2719
+ !*** ../../components/LaserTool/LaserTool.tsx ***!
2720
+ \************************************************/
2721
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2722
+
2723
+ "use strict";
2724
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LaserToolOverlay\": () => (/* binding */ LaserToolOverlay)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _LaserToolOverlay_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LaserToolOverlay.scss */ \"../../components/LaserTool/LaserToolOverlay.scss\");\n\n\n\nconst LaserToolOverlay = ({\n manager\n}) => {\n const svgRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {\n if (svgRef.current) {\n manager.start(svgRef.current);\n }\n\n return () => {\n manager.stop();\n };\n }, [manager]);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({\n className: \"LaserToolOverlay\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"svg\", {\n ref: svgRef,\n className: \"LaserToolOverlayCanvas\"\n })\n }));\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/LaserTool/LaserTool.tsx?");
2725
+
2726
+ /***/ }),
2727
+
2673
2728
  /***/ "../../components/LayerUI.tsx":
2674
2729
  /*!************************************!*\
2675
2730
  !*** ../../components/LayerUI.tsx ***!
@@ -2677,7 +2732,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
2677
2732
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2678
2733
 
2679
2734
  "use strict";
2680
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ \"../../../node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../scene */ \"../../scene/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Actions */ \"../../components/Actions.tsx\");\n/* harmony import */ var _ErrorDialog__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ErrorDialog */ \"../../components/ErrorDialog.tsx\");\n/* harmony import */ var _ImageExportDialog__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ImageExportDialog */ \"../../components/ImageExportDialog.tsx\");\n/* harmony import */ var _FixedSideContainer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./FixedSideContainer */ \"../../components/FixedSideContainer.tsx\");\n/* harmony import */ var _HintViewer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HintViewer */ \"../../components/HintViewer.tsx\");\n/* harmony import */ var _Island__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Island */ \"../../components/Island.tsx\");\n/* harmony import */ var _LoadingMessage__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./LoadingMessage */ \"../../components/LoadingMessage.tsx\");\n/* harmony import */ var _LockButton__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./LockButton */ \"../../components/LockButton.tsx\");\n/* harmony import */ var _MobileMenu__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./MobileMenu */ \"../../components/MobileMenu.tsx\");\n/* harmony import */ var _PasteChartDialog__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./PasteChartDialog */ \"../../components/PasteChartDialog.tsx\");\n/* harmony import */ var _Section__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Section */ \"../../components/Section.tsx\");\n/* harmony import */ var _HelpDialog__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./HelpDialog */ \"../../components/HelpDialog.tsx\");\n/* harmony import */ var _Stack__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Stack */ \"../../components/Stack.tsx\");\n/* harmony import */ var _UserList__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./UserList */ \"../../components/UserList.tsx\");\n/* harmony import */ var _JSONExportDialog__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./JSONExportDialog */ \"../../components/JSONExportDialog.tsx\");\n/* harmony import */ var _PenModeButton__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./PenModeButton */ \"../../components/PenModeButton.tsx\");\n/* harmony import */ var _analytics__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../analytics */ \"../../analytics.ts\");\n/* harmony import */ var _components_App__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../components/App */ \"../../components/App.tsx\");\n/* harmony import */ var _Stats__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Stats */ \"../../components/Stats.tsx\");\n/* harmony import */ var _actions_actionToggleStats__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../actions/actionToggleStats */ \"../../actions/actionToggleStats.tsx\");\n/* harmony import */ var _footer_Footer__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./footer/Footer */ \"../../components/footer/Footer.tsx\");\n/* harmony import */ var _Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Sidebar/Sidebar */ \"../../components/Sidebar/Sidebar.tsx\");\n/* harmony import */ var _jotai__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../jotai */ \"../../jotai.ts\");\n/* harmony import */ var jotai__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! jotai */ \"../../../node_modules/jotai/esm/index.mjs\");\n/* harmony import */ var _main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./main-menu/MainMenu */ \"../../components/main-menu/MainMenu.tsx\");\n/* harmony import */ var _ActiveConfirmDialog__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./ActiveConfirmDialog */ \"../../components/ActiveConfirmDialog.tsx\");\n/* harmony import */ var _OverwriteConfirm_OverwriteConfirm__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./OverwriteConfirm/OverwriteConfirm */ \"../../components/OverwriteConfirm/OverwriteConfirm.tsx\");\n/* harmony import */ var _HandButton__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./HandButton */ \"../../components/HandButton.tsx\");\n/* harmony import */ var _appState__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../appState */ \"../../appState.ts\");\n/* harmony import */ var _context_tunnels__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../context/tunnels */ \"../../context/tunnels.ts\");\n/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./icons */ \"../../components/icons.tsx\");\n/* harmony import */ var _context_ui_appState__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../context/ui-appState */ \"../../context/ui-appState.ts\");\n/* harmony import */ var _DefaultSidebar__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./DefaultSidebar */ \"../../components/DefaultSidebar.tsx\");\n/* harmony import */ var _EyeDropper__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./EyeDropper */ \"../../components/EyeDropper.tsx\");\n/* harmony import */ var _LayerUI_scss__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./LayerUI.scss */ \"../../components/LayerUI.scss\");\n/* harmony import */ var _Toolbar_scss__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Toolbar.scss */ \"../../components/Toolbar.scss\");\n/* harmony import */ var _element_mutateElement__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../element/mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../scene/ShapeCache */ \"../../scene/ShapeCache.ts\");\n/* harmony import */ var _scene_Scene__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../scene/Scene */ \"../../scene/Scene.ts\");\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst DefaultMainMenu = ({\n UIOptions\n}) => {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"], Object.assign({\n __fallback: true\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.LoadScene, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.SaveToActiveFile, {}), UIOptions.canvasActions.export && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.Export, {}), UIOptions.canvasActions.saveAsImage && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.SaveAsImage, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.Help, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.ClearCanvas, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].Separator, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].Group, Object.assign({\n title: \"Excalidraw links\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.Socials, {})\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].Separator, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.ToggleTheme, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.ChangeCanvasBackground, {})]\n }));\n};\n\nconst DefaultOverwriteConfirmDialog = () => {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_OverwriteConfirm_OverwriteConfirm__WEBPACK_IMPORTED_MODULE_33__.OverwriteConfirmDialog, Object.assign({\n __fallback: true\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_OverwriteConfirm_OverwriteConfirm__WEBPACK_IMPORTED_MODULE_33__.OverwriteConfirmDialog.Actions.SaveToDisk, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_OverwriteConfirm_OverwriteConfirm__WEBPACK_IMPORTED_MODULE_33__.OverwriteConfirmDialog.Actions.ExportToImage, {})]\n }));\n};\n\nconst LayerUI = ({\n actionManager,\n appState,\n files,\n setAppState,\n elements,\n canvas,\n interactiveCanvas,\n onLockToggle,\n onHandToolToggle,\n onPenModeToggle,\n showExitZenModeBtn,\n renderTopRightUI,\n renderCustomStats,\n UIOptions,\n onImageAction,\n onExportImage,\n renderWelcomeScreen,\n children,\n app\n}) => {\n const device = (0,_components_App__WEBPACK_IMPORTED_MODULE_25__.useDevice)();\n const tunnels = (0,_context_tunnels__WEBPACK_IMPORTED_MODULE_36__.useInitializeTunnels)();\n const [eyeDropperState, setEyeDropperState] = (0,jotai__WEBPACK_IMPORTED_MODULE_46__.useAtom)(_EyeDropper__WEBPACK_IMPORTED_MODULE_40__.activeEyeDropperAtom, _jotai__WEBPACK_IMPORTED_MODULE_30__.jotaiScope);\n\n const renderJSONExportDialog = () => {\n if (!UIOptions.canvasActions.export) {\n return null;\n }\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_JSONExportDialog__WEBPACK_IMPORTED_MODULE_22__.JSONExportDialog, {\n elements: elements,\n appState: appState,\n files: files,\n actionManager: actionManager,\n exportOpts: UIOptions.canvasActions.export,\n canvas: canvas,\n setAppState: setAppState\n });\n };\n\n const renderImageExportDialog = () => {\n if (!UIOptions.canvasActions.saveAsImage) {\n return null;\n }\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ImageExportDialog__WEBPACK_IMPORTED_MODULE_10__.ImageExportDialog, {\n elements: elements,\n appState: appState,\n files: files,\n actionManager: actionManager,\n onExportImage: onExportImage,\n onCloseRequest: () => setAppState({\n openDialog: null\n })\n });\n };\n\n const renderCanvasActions = () => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n style: {\n position: \"relative\"\n }\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tunnels.MainMenuTunnel.Out, {}), renderWelcomeScreen && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tunnels.WelcomeScreenMenuHintTunnel.Out, {})]\n }));\n\n const renderSelectedShapeActions = () => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_18__.Section, Object.assign({\n heading: \"selectedShapeActions\",\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"selected-shape-actions zen-mode-transition\", {\n \"transition-left\": appState.zenModeEnabled\n })\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Island__WEBPACK_IMPORTED_MODULE_13__.Island, Object.assign({\n className: _constants__WEBPACK_IMPORTED_MODULE_3__.CLASSES.SHAPE_ACTIONS_MENU,\n padding: 2,\n style: {\n // we want to make sure this doesn't overflow so subtracting the\n // approximate height of hamburgerMenu + footer\n maxHeight: `${appState.height - 166}px`\n }\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Actions__WEBPACK_IMPORTED_MODULE_8__.SelectedShapeActions, {\n appState: appState,\n elements: elements,\n renderAction: actionManager.renderAction\n })\n }))\n }));\n\n const renderFixedSideContainer = () => {\n var _a;\n\n const shouldRenderSelectedShapeActions = (0,_element__WEBPACK_IMPORTED_MODULE_4__.showSelectedShapeActions)(appState, elements);\n\n if (appState.viewModeEnabled) {\n return null;\n } //zsviczian\n\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FixedSideContainer__WEBPACK_IMPORTED_MODULE_11__.FixedSideContainer, Object.assign({\n side: \"top\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"App-menu App-menu_top\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Stack__WEBPACK_IMPORTED_MODULE_20__[\"default\"].Col, Object.assign({\n gap: 6,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"App-menu_top__left\")\n }, {\n children: [renderCanvasActions(), shouldRenderSelectedShapeActions && renderSelectedShapeActions()]\n })), !appState.viewModeEnabled && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_18__.Section, Object.assign({\n heading: \"shapes\",\n className: \"shapes-section\"\n }, {\n children: heading => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n style: {\n position: \"relative\"\n }\n }, {\n children: [renderWelcomeScreen && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tunnels.WelcomeScreenToolbarHintTunnel.Out, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stack__WEBPACK_IMPORTED_MODULE_20__[\"default\"].Col, Object.assign({\n gap: 4,\n align: \"start\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stack__WEBPACK_IMPORTED_MODULE_20__[\"default\"].Row, Object.assign({\n gap: 1,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"App-toolbar-container\", {\n \"zen-mode\": appState.zenModeEnabled\n })\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Island__WEBPACK_IMPORTED_MODULE_13__.Island, Object.assign({\n padding: 1,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"App-toolbar\", {\n \"zen-mode\": appState.zenModeEnabled\n })\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HintViewer__WEBPACK_IMPORTED_MODULE_12__.HintViewer, {\n appState: appState,\n isMobile: device.isMobile || !(appState.viewModeEnabled || appState.zenModeEnabled) && appState.trayModeEnabled,\n device: device,\n app: app\n }), heading, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Stack__WEBPACK_IMPORTED_MODULE_20__[\"default\"].Row, Object.assign({\n gap: 1\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PenModeButton__WEBPACK_IMPORTED_MODULE_23__.PenModeButton, {\n zenModeEnabled: appState.zenModeEnabled,\n checked: appState.penMode,\n onChange: onPenModeToggle,\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"toolBar.penMode\"),\n penDetected: appState.penDetected\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_LockButton__WEBPACK_IMPORTED_MODULE_15__.LockButton, {\n checked: appState.activeTool.locked,\n onChange: onLockToggle,\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"toolBar.lock\")\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"App-toolbar__divider\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HandButton__WEBPACK_IMPORTED_MODULE_34__.HandButton, {\n checked: (0,_appState__WEBPACK_IMPORTED_MODULE_35__.isHandToolActive)(appState),\n onChange: () => onHandToolToggle(),\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"toolBar.hand\"),\n isMobile: true\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Actions__WEBPACK_IMPORTED_MODULE_8__.ShapesSwitcher, {\n appState: appState,\n interactiveCanvas: interactiveCanvas,\n activeTool: appState.activeTool,\n setAppState: setAppState,\n onImageAction: ({\n pointerType\n }) => {\n onImageAction({\n insertOnCanvasDirectly: pointerType !== \"mouse\"\n });\n }\n })]\n }))]\n }))\n }))\n }))]\n }))\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"layer-ui__wrapper__top-right zen-mode-transition\", {\n \"transition-right\": appState.zenModeEnabled\n })\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UserList__WEBPACK_IMPORTED_MODULE_21__.UserList, {\n collaborators: appState.collaborators\n }), !appState.viewModeEnabled && ( //zsviczian\n renderTopRightUI === null || renderTopRightUI === void 0 ? void 0 : renderTopRightUI(device.isMobile, appState)), !appState.viewModeEnabled && ( // hide button when sidebar docked\n !isSidebarDocked || ((_a = appState.openSidebar) === null || _a === void 0 ? void 0 : _a.name) !== _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_SIDEBAR.name) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tunnels.DefaultSidebarTriggerTunnel.Out, {})]\n }))]\n }))\n }));\n };\n\n const isTrayMode = !(appState.viewModeEnabled || appState.zenModeEnabled) && appState.trayModeEnabled; //zsviczian\n\n const isTrayModeOrMobile = device.isMobile || isTrayMode; //zsviczian\n\n const renderSidebars = () => {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DefaultSidebar__WEBPACK_IMPORTED_MODULE_39__.DefaultSidebar, {\n __fallback: true,\n onDock: docked => {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_24__.trackEvent)(\"sidebar\", `toggleDock (${docked ? \"dock\" : \"undock\"})`, `(${device.isMobile ? \"mobile\" : \"desktop\"})`);\n }\n });\n };\n\n const isSidebarDocked = (0,jotai__WEBPACK_IMPORTED_MODULE_46__.useAtomValue)(_Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_29__.isSidebarDockedAtom, _jotai__WEBPACK_IMPORTED_MODULE_30__.jotaiScope);\n\n const layerUIJSX = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [children, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(DefaultMainMenu, {\n UIOptions: UIOptions\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DefaultSidebar__WEBPACK_IMPORTED_MODULE_39__.DefaultSidebar.Trigger, {\n __fallback: true,\n icon: _icons__WEBPACK_IMPORTED_MODULE_37__.LibraryIcon,\n title: (0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)((0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"toolBar.library\")),\n onToggle: open => {\n if (open) {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_24__.trackEvent)(\"sidebar\", `${_constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_SIDEBAR.name} (open)`, `button (${device.isMobile ? \"mobile\" : \"desktop\"})`);\n }\n },\n tab: _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_SIDEBAR.defaultTab\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(DefaultOverwriteConfirmDialog, {}), appState.isLoading && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_LoadingMessage__WEBPACK_IMPORTED_MODULE_14__.LoadingMessage, {\n delay: 250\n }), appState.errorMessage && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorDialog__WEBPACK_IMPORTED_MODULE_9__.ErrorDialog, Object.assign({\n onClose: () => setAppState({\n errorMessage: null\n })\n }, {\n children: appState.errorMessage\n })), eyeDropperState && //!device.isMobile && //zsviczian\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_EyeDropper__WEBPACK_IMPORTED_MODULE_40__.EyeDropper, {\n colorPickerType: eyeDropperState.colorPickerType,\n onCancel: () => {\n setEyeDropperState(null);\n },\n onChange: (colorPickerType, color, selectedElements, {\n altKey\n }) => {\n var _a;\n\n if (colorPickerType !== \"elementBackground\" && colorPickerType !== \"elementStroke\") {\n return;\n }\n\n if (selectedElements.length) {\n for (const element of selectedElements) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_43__.mutateElement)(element, {\n [altKey && eyeDropperState.swapPreviewOnAlt ? colorPickerType === \"elementBackground\" ? \"strokeColor\" : \"backgroundColor\" : colorPickerType === \"elementBackground\" ? \"backgroundColor\" : \"strokeColor\"]: color\n }, false);\n _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_44__.ShapeCache[\"delete\"](element);\n }\n\n (_a = _scene_Scene__WEBPACK_IMPORTED_MODULE_45__[\"default\"].getScene(selectedElements[0])) === null || _a === void 0 ? void 0 : _a.informMutation();\n } else if (colorPickerType === \"elementBackground\") {\n setAppState({\n currentItemBackgroundColor: color\n });\n } else {\n setAppState({\n currentItemStrokeColor: color\n });\n }\n },\n onSelect: (color, event) => {\n var _a;\n\n setEyeDropperState(state => {\n return (state === null || state === void 0 ? void 0 : state.keepOpenOnAlt) && event.altKey ? state : null;\n });\n (_a = eyeDropperState === null || eyeDropperState === void 0 ? void 0 : eyeDropperState.onSelect) === null || _a === void 0 ? void 0 : _a.call(eyeDropperState, color, event);\n }\n }), appState.openDialog === \"help\" && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HelpDialog__WEBPACK_IMPORTED_MODULE_19__.HelpDialog, {\n onClose: () => {\n setAppState({\n openDialog: null\n });\n }\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ActiveConfirmDialog__WEBPACK_IMPORTED_MODULE_32__.ActiveConfirmDialog, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tunnels.OverwriteConfirmDialogTunnel.Out, {}), renderImageExportDialog(), renderJSONExportDialog(), appState.pasteDialog.shown && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PasteChartDialog__WEBPACK_IMPORTED_MODULE_17__.PasteChartDialog, {\n setAppState: setAppState,\n appState: appState,\n onClose: () => setAppState({\n pasteDialog: {\n shown: false,\n data: null\n }\n })\n }), (isTrayMode || device.isMobile) && //zsviczian Added isTrayMode condition\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MobileMenu__WEBPACK_IMPORTED_MODULE_16__.MobileMenu, {\n app: app,\n appState: appState,\n elements: elements,\n actionManager: actionManager,\n renderJSONExportDialog: renderJSONExportDialog,\n renderImageExportDialog: renderImageExportDialog,\n setAppState: setAppState,\n onLockToggle: onLockToggle,\n onHandToolToggle: onHandToolToggle,\n onPenModeToggle: onPenModeToggle,\n interactiveCanvas: interactiveCanvas,\n onImageAction: onImageAction,\n renderTopRightUI: renderTopRightUI,\n renderCustomStats: renderCustomStats,\n renderSidebars: renderSidebars,\n device: device,\n renderWelcomeScreen: renderWelcomeScreen\n }), !isTrayModeOrMobile && //zsviczian changed from !device.isMobile\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"layer-ui__wrapper\",\n style: appState.openSidebar && isSidebarDocked && device.canDeviceFitSidebar ? {\n width: `calc(100% - ${_constants__WEBPACK_IMPORTED_MODULE_3__.LIBRARY_SIDEBAR_WIDTH}px)`\n } : {}\n }, {\n children: [renderWelcomeScreen && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tunnels.WelcomeScreenCenterTunnel.Out, {}), renderFixedSideContainer(), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_footer_Footer__WEBPACK_IMPORTED_MODULE_28__[\"default\"], {\n appState: appState,\n actionManager: actionManager,\n showExitZenModeBtn: showExitZenModeBtn,\n renderWelcomeScreen: renderWelcomeScreen\n }), appState.showStats && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stats__WEBPACK_IMPORTED_MODULE_26__.Stats, {\n appState: appState,\n setAppState: setAppState,\n elements: elements,\n onClose: () => {\n actionManager.executeAction(_actions_actionToggleStats__WEBPACK_IMPORTED_MODULE_27__.actionToggleStats);\n },\n renderCustomStats: renderCustomStats\n }), appState.scrolledOutside && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"button\", Object.assign({\n className: \"scroll-back-to-content\",\n onClick: () => {\n setAppState(appState => Object.assign({}, (0,_scene__WEBPACK_IMPORTED_MODULE_6__.calculateScrollCenter)(elements, appState)));\n }\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"buttons.scrollBackToContent\")\n }))]\n })), renderSidebars()]\n })]\n });\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_context_ui_appState__WEBPACK_IMPORTED_MODULE_38__.UIAppStateContext.Provider, Object.assign({\n value: appState\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(jotai__WEBPACK_IMPORTED_MODULE_46__.Provider, Object.assign({\n scope: tunnels.jotaiScope\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_context_tunnels__WEBPACK_IMPORTED_MODULE_36__.TunnelsContext.Provider, Object.assign({\n value: tunnels\n }, {\n children: layerUIJSX\n }))\n }))\n }));\n};\n\nconst stripIrrelevantAppStateProps = appState => {\n const {\n suggestedBindings,\n startBoundElement,\n cursorButton,\n scrollX,\n scrollY\n } = appState,\n ret = __rest(appState, [\"suggestedBindings\", \"startBoundElement\", \"cursorButton\", \"scrollX\", \"scrollY\"]);\n\n return ret;\n};\n\nconst areEqual = (prevProps, nextProps) => {\n // short-circuit early\n if (prevProps.children !== nextProps.children) {\n return false;\n }\n\n const {\n canvas: _pC,\n interactiveCanvas: _pIC,\n appState: prevAppState\n } = prevProps,\n prev = __rest(prevProps, [\"canvas\", \"interactiveCanvas\", \"appState\"]);\n\n const {\n canvas: _nC,\n interactiveCanvas: _nIC,\n appState: nextAppState\n } = nextProps,\n next = __rest(nextProps, [\"canvas\", \"interactiveCanvas\", \"appState\"]);\n\n return (0,_utils__WEBPACK_IMPORTED_MODULE_7__.isShallowEqual)( // asserting AppState because we're being passed the whole AppState\n // but resolve to only the UI-relevant props\n stripIrrelevantAppStateProps(prevAppState), stripIrrelevantAppStateProps(nextAppState), {\n selectedElementIds: _utils__WEBPACK_IMPORTED_MODULE_7__.isShallowEqual,\n selectedGroupIds: _utils__WEBPACK_IMPORTED_MODULE_7__.isShallowEqual\n }) && (0,_utils__WEBPACK_IMPORTED_MODULE_7__.isShallowEqual)(prev, next);\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (react__WEBPACK_IMPORTED_MODULE_2___default().memo(LayerUI, areEqual));\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/LayerUI.tsx?");
2735
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ \"../../../node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../scene */ \"../../scene/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Actions */ \"../../components/Actions.tsx\");\n/* harmony import */ var _ErrorDialog__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ErrorDialog */ \"../../components/ErrorDialog.tsx\");\n/* harmony import */ var _ImageExportDialog__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ImageExportDialog */ \"../../components/ImageExportDialog.tsx\");\n/* harmony import */ var _FixedSideContainer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./FixedSideContainer */ \"../../components/FixedSideContainer.tsx\");\n/* harmony import */ var _HintViewer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HintViewer */ \"../../components/HintViewer.tsx\");\n/* harmony import */ var _Island__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Island */ \"../../components/Island.tsx\");\n/* harmony import */ var _LoadingMessage__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./LoadingMessage */ \"../../components/LoadingMessage.tsx\");\n/* harmony import */ var _LockButton__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./LockButton */ \"../../components/LockButton.tsx\");\n/* harmony import */ var _MobileMenu__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./MobileMenu */ \"../../components/MobileMenu.tsx\");\n/* harmony import */ var _PasteChartDialog__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./PasteChartDialog */ \"../../components/PasteChartDialog.tsx\");\n/* harmony import */ var _Section__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Section */ \"../../components/Section.tsx\");\n/* harmony import */ var _HelpDialog__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./HelpDialog */ \"../../components/HelpDialog.tsx\");\n/* harmony import */ var _Stack__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Stack */ \"../../components/Stack.tsx\");\n/* harmony import */ var _UserList__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./UserList */ \"../../components/UserList.tsx\");\n/* harmony import */ var _JSONExportDialog__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./JSONExportDialog */ \"../../components/JSONExportDialog.tsx\");\n/* harmony import */ var _PenModeButton__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./PenModeButton */ \"../../components/PenModeButton.tsx\");\n/* harmony import */ var _analytics__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../analytics */ \"../../analytics.ts\");\n/* harmony import */ var _components_App__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../components/App */ \"../../components/App.tsx\");\n/* harmony import */ var _Stats__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Stats */ \"../../components/Stats.tsx\");\n/* harmony import */ var _actions_actionToggleStats__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../actions/actionToggleStats */ \"../../actions/actionToggleStats.tsx\");\n/* harmony import */ var _footer_Footer__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./footer/Footer */ \"../../components/footer/Footer.tsx\");\n/* harmony import */ var _Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Sidebar/Sidebar */ \"../../components/Sidebar/Sidebar.tsx\");\n/* harmony import */ var _jotai__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../jotai */ \"../../jotai.ts\");\n/* harmony import */ var jotai__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! jotai */ \"../../../node_modules/jotai/esm/index.mjs\");\n/* harmony import */ var _main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./main-menu/MainMenu */ \"../../components/main-menu/MainMenu.tsx\");\n/* harmony import */ var _ActiveConfirmDialog__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./ActiveConfirmDialog */ \"../../components/ActiveConfirmDialog.tsx\");\n/* harmony import */ var _OverwriteConfirm_OverwriteConfirm__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./OverwriteConfirm/OverwriteConfirm */ \"../../components/OverwriteConfirm/OverwriteConfirm.tsx\");\n/* harmony import */ var _HandButton__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./HandButton */ \"../../components/HandButton.tsx\");\n/* harmony import */ var _appState__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../appState */ \"../../appState.ts\");\n/* harmony import */ var _context_tunnels__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../context/tunnels */ \"../../context/tunnels.ts\");\n/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./icons */ \"../../components/icons.tsx\");\n/* harmony import */ var _context_ui_appState__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../context/ui-appState */ \"../../context/ui-appState.ts\");\n/* harmony import */ var _DefaultSidebar__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./DefaultSidebar */ \"../../components/DefaultSidebar.tsx\");\n/* harmony import */ var _EyeDropper__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./EyeDropper */ \"../../components/EyeDropper.tsx\");\n/* harmony import */ var _LayerUI_scss__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./LayerUI.scss */ \"../../components/LayerUI.scss\");\n/* harmony import */ var _Toolbar_scss__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Toolbar.scss */ \"../../components/Toolbar.scss\");\n/* harmony import */ var _element_mutateElement__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../element/mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../scene/ShapeCache */ \"../../scene/ShapeCache.ts\");\n/* harmony import */ var _scene_Scene__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../scene/Scene */ \"../../scene/Scene.ts\");\n/* harmony import */ var _LaserTool_LaserPointerButton__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./LaserTool/LaserPointerButton */ \"../../components/LaserTool/LaserPointerButton.tsx\");\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst DefaultMainMenu = ({\n UIOptions\n}) => {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"], Object.assign({\n __fallback: true\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.LoadScene, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.SaveToActiveFile, {}), UIOptions.canvasActions.export && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.Export, {}), UIOptions.canvasActions.saveAsImage && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.SaveAsImage, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.Help, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.ClearCanvas, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].Separator, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].Group, Object.assign({\n title: \"Excalidraw links\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.Socials, {})\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].Separator, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.ToggleTheme, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_31__[\"default\"].DefaultItems.ChangeCanvasBackground, {})]\n }));\n};\n\nconst DefaultOverwriteConfirmDialog = () => {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_OverwriteConfirm_OverwriteConfirm__WEBPACK_IMPORTED_MODULE_33__.OverwriteConfirmDialog, Object.assign({\n __fallback: true\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_OverwriteConfirm_OverwriteConfirm__WEBPACK_IMPORTED_MODULE_33__.OverwriteConfirmDialog.Actions.SaveToDisk, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_OverwriteConfirm_OverwriteConfirm__WEBPACK_IMPORTED_MODULE_33__.OverwriteConfirmDialog.Actions.ExportToImage, {})]\n }));\n};\n\nconst LayerUI = ({\n actionManager,\n appState,\n files,\n setAppState,\n elements,\n canvas,\n interactiveCanvas,\n onLockToggle,\n onHandToolToggle,\n onPenModeToggle,\n showExitZenModeBtn,\n renderTopRightUI,\n renderCustomStats,\n UIOptions,\n onImageAction,\n onExportImage,\n renderWelcomeScreen,\n children,\n app,\n isCollaborating\n}) => {\n const device = (0,_components_App__WEBPACK_IMPORTED_MODULE_25__.useDevice)();\n const tunnels = (0,_context_tunnels__WEBPACK_IMPORTED_MODULE_36__.useInitializeTunnels)();\n const [eyeDropperState, setEyeDropperState] = (0,jotai__WEBPACK_IMPORTED_MODULE_47__.useAtom)(_EyeDropper__WEBPACK_IMPORTED_MODULE_40__.activeEyeDropperAtom, _jotai__WEBPACK_IMPORTED_MODULE_30__.jotaiScope);\n\n const renderJSONExportDialog = () => {\n if (!UIOptions.canvasActions.export) {\n return null;\n }\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_JSONExportDialog__WEBPACK_IMPORTED_MODULE_22__.JSONExportDialog, {\n elements: elements,\n appState: appState,\n files: files,\n actionManager: actionManager,\n exportOpts: UIOptions.canvasActions.export,\n canvas: canvas,\n setAppState: setAppState\n });\n };\n\n const renderImageExportDialog = () => {\n if (!UIOptions.canvasActions.saveAsImage) {\n return null;\n }\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ImageExportDialog__WEBPACK_IMPORTED_MODULE_10__.ImageExportDialog, {\n elements: elements,\n appState: appState,\n files: files,\n actionManager: actionManager,\n onExportImage: onExportImage,\n onCloseRequest: () => setAppState({\n openDialog: null\n })\n });\n };\n\n const renderCanvasActions = () => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n style: {\n position: \"relative\"\n }\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tunnels.MainMenuTunnel.Out, {}), renderWelcomeScreen && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tunnels.WelcomeScreenMenuHintTunnel.Out, {})]\n }));\n\n const renderSelectedShapeActions = () => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_18__.Section, Object.assign({\n heading: \"selectedShapeActions\",\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"selected-shape-actions zen-mode-transition\", {\n \"transition-left\": appState.zenModeEnabled\n })\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Island__WEBPACK_IMPORTED_MODULE_13__.Island, Object.assign({\n className: _constants__WEBPACK_IMPORTED_MODULE_3__.CLASSES.SHAPE_ACTIONS_MENU,\n padding: 2,\n style: {\n // we want to make sure this doesn't overflow so subtracting the\n // approximate height of hamburgerMenu + footer\n maxHeight: `${appState.height - 166}px`\n }\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Actions__WEBPACK_IMPORTED_MODULE_8__.SelectedShapeActions, {\n appState: appState,\n elements: elements,\n renderAction: actionManager.renderAction\n })\n }))\n }));\n\n const renderFixedSideContainer = () => {\n var _a;\n\n const shouldRenderSelectedShapeActions = (0,_element__WEBPACK_IMPORTED_MODULE_4__.showSelectedShapeActions)(appState, elements);\n\n if (appState.viewModeEnabled) {\n return null;\n } //zsviczian\n\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FixedSideContainer__WEBPACK_IMPORTED_MODULE_11__.FixedSideContainer, Object.assign({\n side: \"top\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"App-menu App-menu_top\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Stack__WEBPACK_IMPORTED_MODULE_20__[\"default\"].Col, Object.assign({\n gap: 6,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"App-menu_top__left\")\n }, {\n children: [renderCanvasActions(), shouldRenderSelectedShapeActions && renderSelectedShapeActions()]\n })), !appState.viewModeEnabled && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_18__.Section, Object.assign({\n heading: \"shapes\",\n className: \"shapes-section\"\n }, {\n children: heading => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n style: {\n position: \"relative\"\n }\n }, {\n children: [renderWelcomeScreen && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tunnels.WelcomeScreenToolbarHintTunnel.Out, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stack__WEBPACK_IMPORTED_MODULE_20__[\"default\"].Col, Object.assign({\n gap: 4,\n align: \"start\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Stack__WEBPACK_IMPORTED_MODULE_20__[\"default\"].Row, Object.assign({\n gap: 1,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"App-toolbar-container\", {\n \"zen-mode\": appState.zenModeEnabled\n })\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Island__WEBPACK_IMPORTED_MODULE_13__.Island, Object.assign({\n padding: 1,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"App-toolbar\", {\n \"zen-mode\": appState.zenModeEnabled\n })\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HintViewer__WEBPACK_IMPORTED_MODULE_12__.HintViewer, {\n appState: appState,\n isMobile: device.isMobile || !(appState.viewModeEnabled || appState.zenModeEnabled) && appState.trayModeEnabled,\n device: device,\n app: app\n }), heading, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Stack__WEBPACK_IMPORTED_MODULE_20__[\"default\"].Row, Object.assign({\n gap: 1\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PenModeButton__WEBPACK_IMPORTED_MODULE_23__.PenModeButton, {\n zenModeEnabled: appState.zenModeEnabled,\n checked: appState.penMode,\n onChange: onPenModeToggle,\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"toolBar.penMode\"),\n penDetected: appState.penDetected\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_LockButton__WEBPACK_IMPORTED_MODULE_15__.LockButton, {\n checked: appState.activeTool.locked,\n onChange: onLockToggle,\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"toolBar.lock\")\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"App-toolbar__divider\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HandButton__WEBPACK_IMPORTED_MODULE_34__.HandButton, {\n checked: (0,_appState__WEBPACK_IMPORTED_MODULE_35__.isHandToolActive)(appState),\n onChange: () => onHandToolToggle(),\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"toolBar.hand\"),\n isMobile: true\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Actions__WEBPACK_IMPORTED_MODULE_8__.ShapesSwitcher, {\n appState: appState,\n interactiveCanvas: interactiveCanvas,\n activeTool: appState.activeTool,\n app: app,\n onImageAction: ({\n pointerType\n }) => {\n onImageAction({\n insertOnCanvasDirectly: pointerType !== \"mouse\"\n });\n }\n })]\n }))]\n })), isCollaborating && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Island__WEBPACK_IMPORTED_MODULE_13__.Island, Object.assign({\n style: {\n marginLeft: 8,\n alignSelf: \"center\",\n height: \"fit-content\"\n }\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_LaserTool_LaserPointerButton__WEBPACK_IMPORTED_MODULE_46__.LaserPointerButton, {\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"toolBar.laser\"),\n checked: appState.activeTool.type === \"laser\",\n onChange: () => app.setActiveTool({\n type: \"laser\"\n }),\n isMobile: true\n })\n }))]\n }))\n }))]\n }))\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(\"layer-ui__wrapper__top-right zen-mode-transition\", {\n \"transition-right\": appState.zenModeEnabled\n })\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UserList__WEBPACK_IMPORTED_MODULE_21__.UserList, {\n collaborators: appState.collaborators\n }), !appState.viewModeEnabled && ( //zsviczian\n renderTopRightUI === null || renderTopRightUI === void 0 ? void 0 : renderTopRightUI(device.isMobile, appState)), !appState.viewModeEnabled && ( // hide button when sidebar docked\n !isSidebarDocked || ((_a = appState.openSidebar) === null || _a === void 0 ? void 0 : _a.name) !== _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_SIDEBAR.name) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tunnels.DefaultSidebarTriggerTunnel.Out, {})]\n }))]\n }))\n }));\n };\n\n const isTrayMode = !(appState.viewModeEnabled || appState.zenModeEnabled) && appState.trayModeEnabled; //zsviczian\n\n const isTrayModeOrMobile = device.isMobile || isTrayMode; //zsviczian\n\n const renderSidebars = () => {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DefaultSidebar__WEBPACK_IMPORTED_MODULE_39__.DefaultSidebar, {\n __fallback: true,\n onDock: docked => {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_24__.trackEvent)(\"sidebar\", `toggleDock (${docked ? \"dock\" : \"undock\"})`, `(${device.isMobile ? \"mobile\" : \"desktop\"})`);\n }\n });\n };\n\n const isSidebarDocked = (0,jotai__WEBPACK_IMPORTED_MODULE_47__.useAtomValue)(_Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_29__.isSidebarDockedAtom, _jotai__WEBPACK_IMPORTED_MODULE_30__.jotaiScope);\n\n const layerUIJSX = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [children, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(DefaultMainMenu, {\n UIOptions: UIOptions\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DefaultSidebar__WEBPACK_IMPORTED_MODULE_39__.DefaultSidebar.Trigger, {\n __fallback: true,\n icon: _icons__WEBPACK_IMPORTED_MODULE_37__.LibraryIcon,\n title: (0,_utils__WEBPACK_IMPORTED_MODULE_7__.capitalizeString)((0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"toolBar.library\")),\n onToggle: open => {\n if (open) {\n (0,_analytics__WEBPACK_IMPORTED_MODULE_24__.trackEvent)(\"sidebar\", `${_constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_SIDEBAR.name} (open)`, `button (${device.isMobile ? \"mobile\" : \"desktop\"})`);\n }\n },\n tab: _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_SIDEBAR.defaultTab\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(DefaultOverwriteConfirmDialog, {}), appState.isLoading && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_LoadingMessage__WEBPACK_IMPORTED_MODULE_14__.LoadingMessage, {\n delay: 250\n }), appState.errorMessage && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorDialog__WEBPACK_IMPORTED_MODULE_9__.ErrorDialog, Object.assign({\n onClose: () => setAppState({\n errorMessage: null\n })\n }, {\n children: appState.errorMessage\n })), eyeDropperState && //!device.isMobile && //zsviczian\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_EyeDropper__WEBPACK_IMPORTED_MODULE_40__.EyeDropper, {\n colorPickerType: eyeDropperState.colorPickerType,\n onCancel: () => {\n setEyeDropperState(null);\n },\n onChange: (colorPickerType, color, selectedElements, {\n altKey\n }) => {\n var _a;\n\n if (colorPickerType !== \"elementBackground\" && colorPickerType !== \"elementStroke\") {\n return;\n }\n\n if (selectedElements.length) {\n for (const element of selectedElements) {\n (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_43__.mutateElement)(element, {\n [altKey && eyeDropperState.swapPreviewOnAlt ? colorPickerType === \"elementBackground\" ? \"strokeColor\" : \"backgroundColor\" : colorPickerType === \"elementBackground\" ? \"backgroundColor\" : \"strokeColor\"]: color\n }, false);\n _scene_ShapeCache__WEBPACK_IMPORTED_MODULE_44__.ShapeCache[\"delete\"](element);\n }\n\n (_a = _scene_Scene__WEBPACK_IMPORTED_MODULE_45__[\"default\"].getScene(selectedElements[0])) === null || _a === void 0 ? void 0 : _a.informMutation();\n } else if (colorPickerType === \"elementBackground\") {\n setAppState({\n currentItemBackgroundColor: color\n });\n } else {\n setAppState({\n currentItemStrokeColor: color\n });\n }\n },\n onSelect: (color, event) => {\n var _a;\n\n setEyeDropperState(state => {\n return (state === null || state === void 0 ? void 0 : state.keepOpenOnAlt) && event.altKey ? state : null;\n });\n (_a = eyeDropperState === null || eyeDropperState === void 0 ? void 0 : eyeDropperState.onSelect) === null || _a === void 0 ? void 0 : _a.call(eyeDropperState, color, event);\n }\n }), appState.openDialog === \"help\" && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HelpDialog__WEBPACK_IMPORTED_MODULE_19__.HelpDialog, {\n onClose: () => {\n setAppState({\n openDialog: null\n });\n }\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ActiveConfirmDialog__WEBPACK_IMPORTED_MODULE_32__.ActiveConfirmDialog, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tunnels.OverwriteConfirmDialogTunnel.Out, {}), renderImageExportDialog(), renderJSONExportDialog(), appState.pasteDialog.shown && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PasteChartDialog__WEBPACK_IMPORTED_MODULE_17__.PasteChartDialog, {\n setAppState: setAppState,\n appState: appState,\n onClose: () => setAppState({\n pasteDialog: {\n shown: false,\n data: null\n }\n })\n }), (isTrayMode || device.isMobile) && //zsviczian Added isTrayMode condition\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MobileMenu__WEBPACK_IMPORTED_MODULE_16__.MobileMenu, {\n app: app,\n appState: appState,\n elements: elements,\n actionManager: actionManager,\n renderJSONExportDialog: renderJSONExportDialog,\n renderImageExportDialog: renderImageExportDialog,\n setAppState: setAppState,\n onLockToggle: onLockToggle,\n onHandToolToggle: onHandToolToggle,\n onPenModeToggle: onPenModeToggle,\n interactiveCanvas: interactiveCanvas,\n onImageAction: onImageAction,\n renderTopRightUI: renderTopRightUI,\n renderCustomStats: renderCustomStats,\n renderSidebars: renderSidebars,\n device: device,\n renderWelcomeScreen: renderWelcomeScreen\n }), !isTrayModeOrMobile && //zsviczian changed from !device.isMobile\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"layer-ui__wrapper\",\n style: appState.openSidebar && isSidebarDocked && device.canDeviceFitSidebar ? {\n width: `calc(100% - ${_constants__WEBPACK_IMPORTED_MODULE_3__.LIBRARY_SIDEBAR_WIDTH}px)`\n } : {}\n }, {\n children: [renderWelcomeScreen && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(tunnels.WelcomeScreenCenterTunnel.Out, {}), renderFixedSideContainer(), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_footer_Footer__WEBPACK_IMPORTED_MODULE_28__[\"default\"], {\n appState: appState,\n actionManager: actionManager,\n showExitZenModeBtn: showExitZenModeBtn,\n renderWelcomeScreen: renderWelcomeScreen\n }), appState.showStats && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stats__WEBPACK_IMPORTED_MODULE_26__.Stats, {\n appState: appState,\n setAppState: setAppState,\n elements: elements,\n onClose: () => {\n actionManager.executeAction(_actions_actionToggleStats__WEBPACK_IMPORTED_MODULE_27__.actionToggleStats);\n },\n renderCustomStats: renderCustomStats\n }), appState.scrolledOutside && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"button\", Object.assign({\n className: \"scroll-back-to-content\",\n onClick: () => {\n setAppState(appState => Object.assign({}, (0,_scene__WEBPACK_IMPORTED_MODULE_6__.calculateScrollCenter)(elements, appState)));\n }\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"buttons.scrollBackToContent\")\n }))]\n })), renderSidebars()]\n })]\n });\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_context_ui_appState__WEBPACK_IMPORTED_MODULE_38__.UIAppStateContext.Provider, Object.assign({\n value: appState\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(jotai__WEBPACK_IMPORTED_MODULE_47__.Provider, Object.assign({\n scope: tunnels.jotaiScope\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_context_tunnels__WEBPACK_IMPORTED_MODULE_36__.TunnelsContext.Provider, Object.assign({\n value: tunnels\n }, {\n children: layerUIJSX\n }))\n }))\n }));\n};\n\nconst stripIrrelevantAppStateProps = appState => {\n const {\n suggestedBindings,\n startBoundElement,\n cursorButton,\n scrollX,\n scrollY\n } = appState,\n ret = __rest(appState, [\"suggestedBindings\", \"startBoundElement\", \"cursorButton\", \"scrollX\", \"scrollY\"]);\n\n return ret;\n};\n\nconst areEqual = (prevProps, nextProps) => {\n // short-circuit early\n if (prevProps.children !== nextProps.children) {\n return false;\n }\n\n const {\n canvas: _pC,\n interactiveCanvas: _pIC,\n appState: prevAppState\n } = prevProps,\n prev = __rest(prevProps, [\"canvas\", \"interactiveCanvas\", \"appState\"]);\n\n const {\n canvas: _nC,\n interactiveCanvas: _nIC,\n appState: nextAppState\n } = nextProps,\n next = __rest(nextProps, [\"canvas\", \"interactiveCanvas\", \"appState\"]);\n\n return (0,_utils__WEBPACK_IMPORTED_MODULE_7__.isShallowEqual)( // asserting AppState because we're being passed the whole AppState\n // but resolve to only the UI-relevant props\n stripIrrelevantAppStateProps(prevAppState), stripIrrelevantAppStateProps(nextAppState), {\n selectedElementIds: _utils__WEBPACK_IMPORTED_MODULE_7__.isShallowEqual,\n selectedGroupIds: _utils__WEBPACK_IMPORTED_MODULE_7__.isShallowEqual\n }) && (0,_utils__WEBPACK_IMPORTED_MODULE_7__.isShallowEqual)(prev, next);\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (react__WEBPACK_IMPORTED_MODULE_2___default().memo(LayerUI, areEqual));\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/LayerUI.tsx?");
2681
2736
 
2682
2737
  /***/ }),
2683
2738
 
@@ -2798,7 +2853,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
2798
2853
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2799
2854
 
2800
2855
  "use strict";
2801
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MobileMenu\": () => (/* binding */ MobileMenu)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _Stack__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Stack */ \"../../components/Stack.tsx\");\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _FixedSideContainer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FixedSideContainer */ \"../../components/FixedSideContainer.tsx\");\n/* harmony import */ var _Island__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Island */ \"../../components/Island.tsx\");\n/* harmony import */ var _HintViewer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./HintViewer */ \"../../components/HintViewer.tsx\");\n/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../scene */ \"../../scene/index.ts\");\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Actions */ \"../../components/Actions.tsx\");\n/* harmony import */ var _Section__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Section */ \"../../components/Section.tsx\");\n/* harmony import */ var _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../scene/scrollbars */ \"../../scene/scrollbars.ts\");\n/* harmony import */ var _LockButton__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./LockButton */ \"../../components/LockButton.tsx\");\n/* harmony import */ var _PenModeButton__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./PenModeButton */ \"../../components/PenModeButton.tsx\");\n/* harmony import */ var _Stats__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Stats */ \"../../components/Stats.tsx\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../actions */ \"../../actions/index.ts\");\n/* harmony import */ var _HandButton__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./HandButton */ \"../../components/HandButton.tsx\");\n/* harmony import */ var _appState__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../appState */ \"../../appState.ts\");\n/* harmony import */ var _context_tunnels__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../context/tunnels */ \"../../context/tunnels.ts\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst MobileMenu = ({\n appState,\n elements,\n actionManager,\n setAppState,\n onLockToggle,\n onHandToolToggle,\n onPenModeToggle,\n interactiveCanvas,\n onImageAction,\n renderTopRightUI,\n renderCustomStats,\n renderSidebars,\n device,\n renderWelcomeScreen,\n app\n}) => {\n const {\n WelcomeScreenCenterTunnel,\n MainMenuTunnel,\n DefaultSidebarTriggerTunnel\n } = (0,_context_tunnels__WEBPACK_IMPORTED_MODULE_18__.useTunnels)();\n\n const renderToolbar = () => {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_FixedSideContainer__WEBPACK_IMPORTED_MODULE_5__.FixedSideContainer, Object.assign({\n side: \"top\",\n className: \"App-top-bar\"\n }, {\n children: [renderWelcomeScreen && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(WelcomeScreenCenterTunnel.Out, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_10__.Section, Object.assign({\n heading: \"shapes\"\n }, {\n children: heading => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stack__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Col, Object.assign({\n gap: 4,\n align: \"center\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Stack__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Row, Object.assign({\n gap: 1,\n className: \"App-toolbar-container\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Island__WEBPACK_IMPORTED_MODULE_6__.Island, Object.assign({\n padding: 1,\n className: `App-toolbar${device.isMobile ? \" App-toolbar--mobile\" : \"\" //zsviczian\n }`\n }, {\n children: [heading, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stack__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Row, Object.assign({\n gap: 1\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Actions__WEBPACK_IMPORTED_MODULE_9__.ShapesSwitcher, {\n appState: appState,\n interactiveCanvas: interactiveCanvas,\n activeTool: appState.activeTool,\n setAppState: setAppState,\n onImageAction: ({\n pointerType\n }) => {\n onImageAction({\n insertOnCanvasDirectly: pointerType !== \"mouse\"\n });\n }\n })\n }))]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"mobile-misc-tools-container\"\n }, {\n children: [!appState.viewModeEnabled && ( //zsviczian\n renderTopRightUI === null || renderTopRightUI === void 0 ? void 0 : renderTopRightUI(true, appState)), !appState.viewModeEnabled && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(DefaultSidebarTriggerTunnel.Out, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PenModeButton__WEBPACK_IMPORTED_MODULE_13__.PenModeButton, {\n checked: appState.penMode,\n onChange: onPenModeToggle,\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.penMode\"),\n isMobile: true,\n penDetected: appState.penDetected\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_LockButton__WEBPACK_IMPORTED_MODULE_12__.LockButton, {\n checked: appState.activeTool.locked,\n onChange: onLockToggle,\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.lock\"),\n isMobile: true\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HandButton__WEBPACK_IMPORTED_MODULE_16__.HandButton, {\n checked: (0,_appState__WEBPACK_IMPORTED_MODULE_17__.isHandToolActive)(appState),\n onChange: () => onHandToolToggle(),\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.hand\"),\n isMobile: true\n })]\n }))]\n }))\n }))\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HintViewer__WEBPACK_IMPORTED_MODULE_7__.HintViewer, {\n appState: appState,\n isMobile: true,\n device: device,\n app: app\n })]\n }));\n };\n\n const renderAppToolbar = () => {\n if (appState.viewModeEnabled) {\n return; //zsviczian\n\n /*return (\r\n <div className=\"App-toolbar-content\">\r\n <MainMenuTunnel.Out />\r\n </div>\r\n );*/\n } //zsviczian fix mobile menu button positions\n\n\n const showEditMenu = (0,_element__WEBPACK_IMPORTED_MODULE_4__.showSelectedShapeActions)(appState, (0,_element__WEBPACK_IMPORTED_MODULE_4__.getNonDeletedElements)(elements));\n const showElAction = (0,_scene__WEBPACK_IMPORTED_MODULE_8__.isSomeElementSelected)((0,_element__WEBPACK_IMPORTED_MODULE_4__.getNonDeletedElements)(elements), appState);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"App-toolbar-content\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MainMenuTunnel.Out, {}), showEditMenu ? //zsviczian\n actionManager.renderAction(\"toggleEditMenu\") : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"ToolIcon__icon\",\n \"aria-hidden\": \"true\"\n }), actionManager.renderAction(\"undo\"), actionManager.renderAction(\"redo\"), showElAction || appState.multiElement ? //zsviczian\n actionManager.renderAction(appState.multiElement ? \"finalize\" : \"duplicateSelection\") : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"ToolIcon__icon\",\n \"aria-hidden\": \"true\"\n }), showElAction ? //zsviczian\n actionManager.renderAction(\"deleteSelectedElements\") : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"ToolIcon__icon\",\n \"aria-hidden\": \"true\"\n })]\n }));\n };\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [renderSidebars(), !appState.viewModeEnabled && renderToolbar(), !appState.openMenu && appState.showStats && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stats__WEBPACK_IMPORTED_MODULE_14__.Stats, {\n appState: appState,\n setAppState: setAppState,\n elements: elements,\n onClose: () => {\n actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_15__.actionToggleStats);\n },\n renderCustomStats: renderCustomStats\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"App-bottom-bar\",\n style: {\n marginBottom: _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__.SCROLLBAR_WIDTH + _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__.SCROLLBAR_MARGIN,\n marginLeft: _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__.SCROLLBAR_WIDTH + _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__.SCROLLBAR_MARGIN * 2,\n marginRight: _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__.SCROLLBAR_WIDTH + _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__.SCROLLBAR_MARGIN * 2\n }\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Island__WEBPACK_IMPORTED_MODULE_6__.Island, Object.assign({\n padding: 0\n }, {\n children: [appState.openMenu === \"shape\" && !appState.viewModeEnabled && (0,_element__WEBPACK_IMPORTED_MODULE_4__.showSelectedShapeActions)(appState, elements) ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_10__.Section, Object.assign({\n className: \"App-mobile-menu\",\n heading: \"selectedShapeActions\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Actions__WEBPACK_IMPORTED_MODULE_9__.SelectedShapeActions, {\n appState: appState,\n elements: elements,\n renderAction: actionManager.renderAction\n })\n })) : null, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"footer\", Object.assign({\n className: \"App-toolbar\"\n }, {\n children: [renderAppToolbar(), appState.scrolledOutside && !appState.openMenu && !appState.openSidebar && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"button\", Object.assign({\n className: \"scroll-back-to-content\",\n onClick: () => {\n setAppState(appState => Object.assign({}, (0,_scene__WEBPACK_IMPORTED_MODULE_8__.calculateScrollCenter)(elements, appState)));\n }\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.scrollBackToContent\")\n }))]\n }))]\n })), appState.trayModeEnabled ? //zsviczian display zoom menu in tray mode\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Island__WEBPACK_IMPORTED_MODULE_6__.Island, Object.assign({\n padding: 1,\n style: {\n marginLeft: `4px`\n }\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Actions__WEBPACK_IMPORTED_MODULE_9__.ZoomActions, {\n renderAction: actionManager.renderAction,\n zoom: appState.zoom,\n trayMode: true\n })\n })) : \"\"]\n }))]\n });\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/MobileMenu.tsx?");
2856
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MobileMenu\": () => (/* binding */ MobileMenu)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _Stack__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Stack */ \"../../components/Stack.tsx\");\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _FixedSideContainer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FixedSideContainer */ \"../../components/FixedSideContainer.tsx\");\n/* harmony import */ var _Island__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Island */ \"../../components/Island.tsx\");\n/* harmony import */ var _HintViewer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./HintViewer */ \"../../components/HintViewer.tsx\");\n/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../scene */ \"../../scene/index.ts\");\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Actions */ \"../../components/Actions.tsx\");\n/* harmony import */ var _Section__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Section */ \"../../components/Section.tsx\");\n/* harmony import */ var _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../scene/scrollbars */ \"../../scene/scrollbars.ts\");\n/* harmony import */ var _LockButton__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./LockButton */ \"../../components/LockButton.tsx\");\n/* harmony import */ var _PenModeButton__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./PenModeButton */ \"../../components/PenModeButton.tsx\");\n/* harmony import */ var _Stats__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Stats */ \"../../components/Stats.tsx\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../actions */ \"../../actions/index.ts\");\n/* harmony import */ var _HandButton__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./HandButton */ \"../../components/HandButton.tsx\");\n/* harmony import */ var _appState__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../appState */ \"../../appState.ts\");\n/* harmony import */ var _context_tunnels__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../context/tunnels */ \"../../context/tunnels.ts\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst MobileMenu = ({\n appState,\n elements,\n actionManager,\n setAppState,\n onLockToggle,\n onHandToolToggle,\n onPenModeToggle,\n interactiveCanvas,\n onImageAction,\n renderTopRightUI,\n renderCustomStats,\n renderSidebars,\n device,\n renderWelcomeScreen,\n app\n}) => {\n const {\n WelcomeScreenCenterTunnel,\n MainMenuTunnel,\n DefaultSidebarTriggerTunnel\n } = (0,_context_tunnels__WEBPACK_IMPORTED_MODULE_18__.useTunnels)();\n\n const renderToolbar = () => {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_FixedSideContainer__WEBPACK_IMPORTED_MODULE_5__.FixedSideContainer, Object.assign({\n side: \"top\",\n className: \"App-top-bar\"\n }, {\n children: [renderWelcomeScreen && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(WelcomeScreenCenterTunnel.Out, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_10__.Section, Object.assign({\n heading: \"shapes\"\n }, {\n children: heading => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stack__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Col, Object.assign({\n gap: 4,\n align: \"center\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Stack__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Row, Object.assign({\n gap: 1,\n className: \"App-toolbar-container\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Island__WEBPACK_IMPORTED_MODULE_6__.Island, Object.assign({\n padding: 1,\n className: `App-toolbar${device.isMobile ? \" App-toolbar--mobile\" : \"\" //zsviczian\n }`\n }, {\n children: [heading, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stack__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Row, Object.assign({\n gap: 1\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Actions__WEBPACK_IMPORTED_MODULE_9__.ShapesSwitcher, {\n appState: appState,\n interactiveCanvas: interactiveCanvas,\n activeTool: appState.activeTool,\n app: app,\n onImageAction: ({\n pointerType\n }) => {\n onImageAction({\n insertOnCanvasDirectly: pointerType !== \"mouse\"\n });\n }\n })\n }))]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"mobile-misc-tools-container\"\n }, {\n children: [!appState.viewModeEnabled && ( //zsviczian\n renderTopRightUI === null || renderTopRightUI === void 0 ? void 0 : renderTopRightUI(true, appState)), !appState.viewModeEnabled && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(DefaultSidebarTriggerTunnel.Out, {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PenModeButton__WEBPACK_IMPORTED_MODULE_13__.PenModeButton, {\n checked: appState.penMode,\n onChange: onPenModeToggle,\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.penMode\"),\n isMobile: true,\n penDetected: appState.penDetected\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_LockButton__WEBPACK_IMPORTED_MODULE_12__.LockButton, {\n checked: appState.activeTool.locked,\n onChange: onLockToggle,\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.lock\"),\n isMobile: true\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HandButton__WEBPACK_IMPORTED_MODULE_16__.HandButton, {\n checked: (0,_appState__WEBPACK_IMPORTED_MODULE_17__.isHandToolActive)(appState),\n onChange: () => onHandToolToggle(),\n title: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"toolBar.hand\"),\n isMobile: true\n })]\n }))]\n }))\n }))\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HintViewer__WEBPACK_IMPORTED_MODULE_7__.HintViewer, {\n appState: appState,\n isMobile: true,\n device: device,\n app: app\n })]\n }));\n };\n\n const renderAppToolbar = () => {\n if (appState.viewModeEnabled) {\n return; //zsviczian\n\n /*return (\r\n <div className=\"App-toolbar-content\">\r\n <MainMenuTunnel.Out />\r\n </div>\r\n );*/\n } //zsviczian fix mobile menu button positions\n\n\n const showEditMenu = (0,_element__WEBPACK_IMPORTED_MODULE_4__.showSelectedShapeActions)(appState, (0,_element__WEBPACK_IMPORTED_MODULE_4__.getNonDeletedElements)(elements));\n const showElAction = (0,_scene__WEBPACK_IMPORTED_MODULE_8__.isSomeElementSelected)((0,_element__WEBPACK_IMPORTED_MODULE_4__.getNonDeletedElements)(elements), appState);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"App-toolbar-content\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MainMenuTunnel.Out, {}), showEditMenu ? //zsviczian\n actionManager.renderAction(\"toggleEditMenu\") : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"ToolIcon__icon\",\n \"aria-hidden\": \"true\"\n }), actionManager.renderAction(\"undo\"), actionManager.renderAction(\"redo\"), showElAction || appState.multiElement ? //zsviczian\n actionManager.renderAction(appState.multiElement ? \"finalize\" : \"duplicateSelection\") : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"ToolIcon__icon\",\n \"aria-hidden\": \"true\"\n }), showElAction ? //zsviczian\n actionManager.renderAction(\"deleteSelectedElements\") : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", {\n className: \"ToolIcon__icon\",\n \"aria-hidden\": \"true\"\n })]\n }));\n };\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [renderSidebars(), !appState.viewModeEnabled && renderToolbar(), !appState.openMenu && appState.showStats && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Stats__WEBPACK_IMPORTED_MODULE_14__.Stats, {\n appState: appState,\n setAppState: setAppState,\n elements: elements,\n onClose: () => {\n actionManager.executeAction(_actions__WEBPACK_IMPORTED_MODULE_15__.actionToggleStats);\n },\n renderCustomStats: renderCustomStats\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", Object.assign({\n className: \"App-bottom-bar\",\n style: {\n marginBottom: _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__.SCROLLBAR_WIDTH + _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__.SCROLLBAR_MARGIN,\n marginLeft: _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__.SCROLLBAR_WIDTH + _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__.SCROLLBAR_MARGIN * 2,\n marginRight: _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__.SCROLLBAR_WIDTH + _scene_scrollbars__WEBPACK_IMPORTED_MODULE_11__.SCROLLBAR_MARGIN * 2\n }\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Island__WEBPACK_IMPORTED_MODULE_6__.Island, Object.assign({\n padding: 0\n }, {\n children: [appState.openMenu === \"shape\" && !appState.viewModeEnabled && (0,_element__WEBPACK_IMPORTED_MODULE_4__.showSelectedShapeActions)(appState, elements) ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Section__WEBPACK_IMPORTED_MODULE_10__.Section, Object.assign({\n className: \"App-mobile-menu\",\n heading: \"selectedShapeActions\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Actions__WEBPACK_IMPORTED_MODULE_9__.SelectedShapeActions, {\n appState: appState,\n elements: elements,\n renderAction: actionManager.renderAction\n })\n })) : null, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"footer\", Object.assign({\n className: \"App-toolbar\"\n }, {\n children: [renderAppToolbar(), appState.scrolledOutside && !appState.openMenu && !appState.openSidebar && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"button\", Object.assign({\n className: \"scroll-back-to-content\",\n onClick: () => {\n setAppState(appState => Object.assign({}, (0,_scene__WEBPACK_IMPORTED_MODULE_8__.calculateScrollCenter)(elements, appState)));\n }\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_2__.t)(\"buttons.scrollBackToContent\")\n }))]\n }))]\n })), appState.trayModeEnabled ? //zsviczian display zoom menu in tray mode\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Island__WEBPACK_IMPORTED_MODULE_6__.Island, Object.assign({\n padding: 1,\n style: {\n marginLeft: `4px`\n }\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Actions__WEBPACK_IMPORTED_MODULE_9__.ZoomActions, {\n renderAction: actionManager.renderAction,\n zoom: appState.zoom,\n trayMode: true\n })\n })) : \"\"]\n }))]\n });\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/MobileMenu.tsx?");
2802
2857
 
2803
2858
  /***/ }),
2804
2859
 
@@ -3117,7 +3172,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
3117
3172
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3118
3173
 
3119
3174
  "use strict";
3120
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _renderer_renderScene__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../renderer/renderScene */ \"../../renderer/renderScene.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ \"../../utils.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants */ \"../../constants.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../i18n */ \"../../i18n.ts\");\n\n\n\n\n\n\n\nconst InteractiveCanvas = props => {\n const isComponentMounted = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {\n var _a;\n\n if (!isComponentMounted.current) {\n isComponentMounted.current = true;\n return;\n }\n\n const cursorButton = {};\n const pointerViewportCoords = {};\n const remoteSelectedElementIds = {};\n const pointerUsernames = {};\n const pointerUserStates = {};\n props.appState.collaborators.forEach((user, socketId) => {\n if (user.selectedElementIds) {\n for (const id of Object.keys(user.selectedElementIds)) {\n if (!(id in remoteSelectedElementIds)) {\n remoteSelectedElementIds[id] = [];\n }\n\n remoteSelectedElementIds[id].push(socketId);\n }\n }\n\n if (!user.pointer) {\n return;\n }\n\n if (user.username) {\n pointerUsernames[socketId] = user.username;\n }\n\n if (user.userState) {\n pointerUserStates[socketId] = user.userState;\n }\n\n pointerViewportCoords[socketId] = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.sceneCoordsToViewportCoords)({\n sceneX: user.pointer.x,\n sceneY: user.pointer.y\n }, props.appState);\n cursorButton[socketId] = user.button;\n });\n const selectionColor = ((_a = props.containerRef) === null || _a === void 0 ? void 0 : _a.current) && getComputedStyle(props.containerRef.current).getPropertyValue(\"--color-selection\") || \"#6965db\";\n (0,_renderer_renderScene__WEBPACK_IMPORTED_MODULE_2__.renderInteractiveScene)({\n canvas: props.canvas,\n elements: props.elements,\n visibleElements: props.visibleElements,\n selectedElements: props.selectedElements,\n scale: window.devicePixelRatio,\n appState: props.appState,\n renderConfig: {\n remotePointerViewportCoords: pointerViewportCoords,\n remotePointerButton: cursorButton,\n remoteSelectedElementIds,\n remotePointerUsernames: pointerUsernames,\n remotePointerUserStates: pointerUserStates,\n selectionColor,\n renderScrollbars: false\n },\n callback: props.renderInteractiveSceneCallback\n }, (0,_utils__WEBPACK_IMPORTED_MODULE_3__.isRenderThrottlingEnabled)());\n });\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"canvas\", Object.assign({\n className: \"excalidraw__canvas interactive\",\n style: {\n width: props.appState.width,\n height: props.appState.height,\n cursor: props.appState.viewModeEnabled ? _constants__WEBPACK_IMPORTED_MODULE_4__.CURSOR_TYPE.GRAB : _constants__WEBPACK_IMPORTED_MODULE_4__.CURSOR_TYPE.AUTO\n },\n width: props.appState.width * props.scale,\n height: props.appState.height * props.scale,\n ref: props.handleCanvasRef,\n onContextMenu: props.onContextMenu,\n onPointerMove: props.onPointerMove,\n onPointerUp: props.onPointerUp,\n onPointerCancel: props.onPointerCancel,\n onTouchMove: props.onTouchMove,\n onPointerDown: props.onPointerDown,\n onDoubleClick: props.appState.viewModeEnabled ? undefined : props.onDoubleClick\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"labels.drawingCanvas\")\n }));\n};\n\nconst getRelevantAppStateProps = appState => ({\n zoom: appState.zoom,\n scrollX: appState.scrollX,\n scrollY: appState.scrollY,\n width: appState.width,\n height: appState.height,\n viewModeEnabled: appState.viewModeEnabled,\n editingGroupId: appState.editingGroupId,\n editingLinearElement: appState.editingLinearElement,\n selectedElementIds: appState.selectedElementIds,\n frameToHighlight: appState.frameToHighlight,\n offsetLeft: appState.offsetLeft,\n offsetTop: appState.offsetTop,\n theme: appState.theme,\n pendingImageElementId: appState.pendingImageElementId,\n selectionElement: appState.selectionElement,\n selectedGroupIds: appState.selectedGroupIds,\n selectedLinearElement: appState.selectedLinearElement,\n multiElement: appState.multiElement,\n isBindingEnabled: appState.isBindingEnabled,\n suggestedBindings: appState.suggestedBindings,\n isRotating: appState.isRotating,\n elementsToHighlight: appState.elementsToHighlight,\n openSidebar: appState.openSidebar,\n showHyperlinkPopup: appState.showHyperlinkPopup,\n collaborators: appState.collaborators,\n activeEmbeddable: appState.activeEmbeddable,\n snapLines: appState.snapLines,\n zenModeEnabled: appState.zenModeEnabled\n});\n\nconst areEqual = (prevProps, nextProps) => {\n // This could be further optimised if needed, as we don't have to render interactive canvas on each scene mutation\n if (prevProps.selectionNonce !== nextProps.selectionNonce || prevProps.versionNonce !== nextProps.versionNonce || prevProps.scale !== nextProps.scale || // we need to memoize on element arrays because they may have renewed\n // even if versionNonce didn't change (e.g. we filter elements out based\n // on appState)\n prevProps.elements !== nextProps.elements || prevProps.visibleElements !== nextProps.visibleElements || prevProps.selectedElements !== nextProps.selectedElements) {\n return false;\n } // Comparing the interactive appState for changes in case of some edge cases\n\n\n return (0,_utils__WEBPACK_IMPORTED_MODULE_3__.isShallowEqual)( // asserting AppState because we're being passed the whole AppState\n // but resolve to only the InteractiveCanvas-relevant props\n getRelevantAppStateProps(prevProps.appState), getRelevantAppStateProps(nextProps.appState));\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (react__WEBPACK_IMPORTED_MODULE_1___default().memo(InteractiveCanvas, areEqual));\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/canvases/InteractiveCanvas.tsx?");
3175
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _renderer_renderScene__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../renderer/renderScene */ \"../../renderer/renderScene.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ \"../../utils.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants */ \"../../constants.ts\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../i18n */ \"../../i18n.ts\");\n\n\n\n\n\n\n\nconst InteractiveCanvas = props => {\n const isComponentMounted = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {\n var _a;\n\n if (!isComponentMounted.current) {\n isComponentMounted.current = true;\n return;\n }\n\n const cursorButton = {};\n const pointerViewportCoords = {};\n const remoteSelectedElementIds = {};\n const pointerUsernames = {};\n const pointerUserStates = {};\n props.appState.collaborators.forEach((user, socketId) => {\n if (user.selectedElementIds) {\n for (const id of Object.keys(user.selectedElementIds)) {\n if (!(id in remoteSelectedElementIds)) {\n remoteSelectedElementIds[id] = [];\n }\n\n remoteSelectedElementIds[id].push(socketId);\n }\n }\n\n if (!user.pointer) {\n return;\n }\n\n if (user.username) {\n pointerUsernames[socketId] = user.username;\n }\n\n if (user.userState) {\n pointerUserStates[socketId] = user.userState;\n }\n\n pointerViewportCoords[socketId] = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.sceneCoordsToViewportCoords)({\n sceneX: user.pointer.x,\n sceneY: user.pointer.y\n }, props.appState);\n cursorButton[socketId] = user.button;\n });\n const selectionColor = ((_a = props.containerRef) === null || _a === void 0 ? void 0 : _a.current) && getComputedStyle(props.containerRef.current).getPropertyValue(\"--color-selection\") || \"#6965db\";\n (0,_renderer_renderScene__WEBPACK_IMPORTED_MODULE_2__.renderInteractiveScene)({\n canvas: props.canvas,\n elements: props.elements,\n visibleElements: props.visibleElements,\n selectedElements: props.selectedElements,\n scale: window.devicePixelRatio,\n appState: props.appState,\n renderConfig: {\n remotePointerViewportCoords: pointerViewportCoords,\n remotePointerButton: cursorButton,\n remoteSelectedElementIds,\n remotePointerUsernames: pointerUsernames,\n remotePointerUserStates: pointerUserStates,\n selectionColor,\n renderScrollbars: false\n },\n callback: props.renderInteractiveSceneCallback\n }, (0,_utils__WEBPACK_IMPORTED_MODULE_3__.isRenderThrottlingEnabled)());\n });\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"canvas\", Object.assign({\n className: \"excalidraw__canvas interactive\",\n style: {\n width: props.appState.width,\n height: props.appState.height,\n cursor: props.appState.viewModeEnabled ? _constants__WEBPACK_IMPORTED_MODULE_4__.CURSOR_TYPE.GRAB : _constants__WEBPACK_IMPORTED_MODULE_4__.CURSOR_TYPE.AUTO\n },\n width: props.appState.width * props.scale,\n height: props.appState.height * props.scale,\n ref: props.handleCanvasRef,\n onContextMenu: props.onContextMenu,\n onPointerMove: props.onPointerMove,\n onPointerUp: props.onPointerUp,\n onPointerCancel: props.onPointerCancel,\n onTouchMove: props.onTouchMove,\n onPointerDown: props.onPointerDown,\n onDoubleClick: props.onDoubleClick\n }, {\n children: (0,_i18n__WEBPACK_IMPORTED_MODULE_5__.t)(\"labels.drawingCanvas\")\n }));\n};\n\nconst getRelevantAppStateProps = appState => ({\n zoom: appState.zoom,\n scrollX: appState.scrollX,\n scrollY: appState.scrollY,\n width: appState.width,\n height: appState.height,\n viewModeEnabled: appState.viewModeEnabled,\n editingGroupId: appState.editingGroupId,\n editingLinearElement: appState.editingLinearElement,\n selectedElementIds: appState.selectedElementIds,\n frameToHighlight: appState.frameToHighlight,\n offsetLeft: appState.offsetLeft,\n offsetTop: appState.offsetTop,\n theme: appState.theme,\n pendingImageElementId: appState.pendingImageElementId,\n selectionElement: appState.selectionElement,\n selectedGroupIds: appState.selectedGroupIds,\n selectedLinearElement: appState.selectedLinearElement,\n multiElement: appState.multiElement,\n isBindingEnabled: appState.isBindingEnabled,\n suggestedBindings: appState.suggestedBindings,\n isRotating: appState.isRotating,\n elementsToHighlight: appState.elementsToHighlight,\n openSidebar: appState.openSidebar,\n showHyperlinkPopup: appState.showHyperlinkPopup,\n collaborators: appState.collaborators,\n activeEmbeddable: appState.activeEmbeddable,\n snapLines: appState.snapLines,\n zenModeEnabled: appState.zenModeEnabled\n});\n\nconst areEqual = (prevProps, nextProps) => {\n // This could be further optimised if needed, as we don't have to render interactive canvas on each scene mutation\n if (prevProps.selectionNonce !== nextProps.selectionNonce || prevProps.versionNonce !== nextProps.versionNonce || prevProps.scale !== nextProps.scale || // we need to memoize on element arrays because they may have renewed\n // even if versionNonce didn't change (e.g. we filter elements out based\n // on appState)\n prevProps.elements !== nextProps.elements || prevProps.visibleElements !== nextProps.visibleElements || prevProps.selectedElements !== nextProps.selectedElements) {\n return false;\n } // Comparing the interactive appState for changes in case of some edge cases\n\n\n return (0,_utils__WEBPACK_IMPORTED_MODULE_3__.isShallowEqual)( // asserting AppState because we're being passed the whole AppState\n // but resolve to only the InteractiveCanvas-relevant props\n getRelevantAppStateProps(prevProps.appState), getRelevantAppStateProps(nextProps.appState));\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (react__WEBPACK_IMPORTED_MODULE_1___default().memo(InteractiveCanvas, areEqual));\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/canvases/InteractiveCanvas.tsx?");
3121
3176
 
3122
3177
  /***/ }),
3123
3178
 
@@ -3183,7 +3238,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
3183
3238
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3184
3239
 
3185
3240
  "use strict";
3186
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./common */ \"../../components/dropdownMenu/common.ts\");\n/* harmony import */ var _DropdownMenuItemContent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DropdownMenuItemContent */ \"../../components/dropdownMenu/DropdownMenuItemContent.tsx\");\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\nconst DropdownMenuItem = _a => {\n var _b;\n\n var {\n icon,\n onSelect,\n children,\n shortcut,\n className\n } = _a,\n rest = __rest(_a, [\"icon\", \"onSelect\", \"children\", \"shortcut\", \"className\"]);\n\n const handleClick = (0,_common__WEBPACK_IMPORTED_MODULE_2__.useHandleDropdownMenuItemClick)(rest.onClick, onSelect);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"button\", Object.assign({}, rest, {\n onClick: handleClick,\n type: \"button\",\n className: (0,_common__WEBPACK_IMPORTED_MODULE_2__.getDropdownMenuItemClassName)(className),\n \"aria-label\": (_b = rest.title) !== null && _b !== void 0 ? _b : rest[\"aria-label\"]\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DropdownMenuItemContent__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object.assign({\n icon: icon,\n shortcut: shortcut\n }, {\n children: children\n }))\n }));\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DropdownMenuItem);\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/dropdownMenu/DropdownMenuItem.tsx?");
3241
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./common */ \"../../components/dropdownMenu/common.ts\");\n/* harmony import */ var _DropdownMenuItemContent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DropdownMenuItemContent */ \"../../components/dropdownMenu/DropdownMenuItemContent.tsx\");\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\nconst DropdownMenuItem = _a => {\n var _b;\n\n var {\n icon,\n onSelect,\n children,\n shortcut,\n className,\n selected\n } = _a,\n rest = __rest(_a, [\"icon\", \"onSelect\", \"children\", \"shortcut\", \"className\", \"selected\"]);\n\n const handleClick = (0,_common__WEBPACK_IMPORTED_MODULE_2__.useHandleDropdownMenuItemClick)(rest.onClick, onSelect);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"button\", Object.assign({}, rest, {\n onClick: handleClick,\n type: \"button\",\n className: (0,_common__WEBPACK_IMPORTED_MODULE_2__.getDropdownMenuItemClassName)(className, selected),\n \"aria-label\": (_b = rest.title) !== null && _b !== void 0 ? _b : rest[\"aria-label\"]\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DropdownMenuItemContent__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object.assign({\n icon: icon,\n shortcut: shortcut\n }, {\n children: children\n }))\n }));\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DropdownMenuItem);\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/dropdownMenu/DropdownMenuItem.tsx?");
3187
3242
 
3188
3243
  /***/ }),
3189
3244
 
@@ -3205,7 +3260,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
3205
3260
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3206
3261
 
3207
3262
  "use strict";
3208
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\nconst DropdownMenuItemCustom = _a => {\n var {\n children,\n className = \"\"\n } = _a,\n rest = __rest(_a, [\"children\", \"className\"]);\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({}, rest, {\n className: `dropdown-menu-item-base dropdown-menu-item-custom ${className}`.trim()\n }, {\n children: children\n }));\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DropdownMenuItemCustom);\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/dropdownMenu/DropdownMenuItemCustom.tsx?");
3263
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\nconst DropdownMenuItemCustom = _a => {\n var {\n children,\n className = \"\",\n selected\n } = _a,\n rest = __rest(_a, [\"children\", \"className\", \"selected\"]);\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", Object.assign({}, rest, {\n className: `dropdown-menu-item-base dropdown-menu-item-custom ${className} ${selected ? `dropdown-menu-item--selected` : ``}`.trim()\n }, {\n children: children\n }));\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DropdownMenuItemCustom);\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/dropdownMenu/DropdownMenuItemCustom.tsx?");
3209
3264
 
3210
3265
  /***/ }),
3211
3266
 
@@ -3216,7 +3271,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
3216
3271
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3217
3272
 
3218
3273
  "use strict";
3219
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _DropdownMenuItemContent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DropdownMenuItemContent */ \"../../components/dropdownMenu/DropdownMenuItemContent.tsx\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./common */ \"../../components/dropdownMenu/common.ts\");\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\nconst DropdownMenuItemLink = _a => {\n var _b;\n\n var {\n icon,\n shortcut,\n href,\n children,\n onSelect,\n className = \"\"\n } = _a,\n rest = __rest(_a, [\"icon\", \"shortcut\", \"href\", \"children\", \"onSelect\", \"className\"]);\n\n const handleClick = (0,_common__WEBPACK_IMPORTED_MODULE_3__.useHandleDropdownMenuItemClick)(rest.onClick, onSelect);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"a\", Object.assign({}, rest, {\n href: href,\n target: \"_blank\",\n rel: \"noreferrer\",\n className: (0,_common__WEBPACK_IMPORTED_MODULE_3__.getDropdownMenuItemClassName)(className),\n title: (_b = rest.title) !== null && _b !== void 0 ? _b : rest[\"aria-label\"],\n onClick: handleClick\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DropdownMenuItemContent__WEBPACK_IMPORTED_MODULE_1__[\"default\"], Object.assign({\n icon: icon,\n shortcut: shortcut\n }, {\n children: children\n }))\n }));\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DropdownMenuItemLink);\nDropdownMenuItemLink.displayName = \"DropdownMenuItemLink\";\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/dropdownMenu/DropdownMenuItemLink.tsx?");
3274
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _DropdownMenuItemContent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DropdownMenuItemContent */ \"../../components/dropdownMenu/DropdownMenuItemContent.tsx\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./common */ \"../../components/dropdownMenu/common.ts\");\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\nconst DropdownMenuItemLink = _a => {\n var _b;\n\n var {\n icon,\n shortcut,\n href,\n children,\n onSelect,\n className = \"\",\n selected\n } = _a,\n rest = __rest(_a, [\"icon\", \"shortcut\", \"href\", \"children\", \"onSelect\", \"className\", \"selected\"]);\n\n const handleClick = (0,_common__WEBPACK_IMPORTED_MODULE_3__.useHandleDropdownMenuItemClick)(rest.onClick, onSelect);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"a\", Object.assign({}, rest, {\n href: href,\n target: \"_blank\",\n rel: \"noreferrer\",\n className: (0,_common__WEBPACK_IMPORTED_MODULE_3__.getDropdownMenuItemClassName)(className, selected),\n title: (_b = rest.title) !== null && _b !== void 0 ? _b : rest[\"aria-label\"],\n onClick: handleClick\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DropdownMenuItemContent__WEBPACK_IMPORTED_MODULE_1__[\"default\"], Object.assign({\n icon: icon,\n shortcut: shortcut\n }, {\n children: children\n }))\n }));\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DropdownMenuItemLink);\nDropdownMenuItemLink.displayName = \"DropdownMenuItemLink\";\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/dropdownMenu/DropdownMenuItemLink.tsx?");
3220
3275
 
3221
3276
  /***/ }),
3222
3277
 
@@ -3249,7 +3304,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
3249
3304
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3250
3305
 
3251
3306
  "use strict";
3252
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DropdownMenuContentPropsContext\": () => (/* binding */ DropdownMenuContentPropsContext),\n/* harmony export */ \"getDropdownMenuItemClassName\": () => (/* binding */ getDropdownMenuItemClassName),\n/* harmony export */ \"useHandleDropdownMenuItemClick\": () => (/* binding */ useHandleDropdownMenuItemClick)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../constants */ \"../../constants.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"../../utils.ts\");\n\n\n\nconst DropdownMenuContentPropsContext = react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});\nconst getDropdownMenuItemClassName = (className = \"\") => {\n return `dropdown-menu-item dropdown-menu-item-base ${className}`.trim();\n};\nconst useHandleDropdownMenuItemClick = (origOnClick, onSelect) => {\n const DropdownMenuContentProps = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(DropdownMenuContentPropsContext);\n return (0,_utils__WEBPACK_IMPORTED_MODULE_2__.composeEventHandlers)(origOnClick, event => {\n var _a;\n\n const itemSelectEvent = new CustomEvent(_constants__WEBPACK_IMPORTED_MODULE_1__.EVENT.MENU_ITEM_SELECT, {\n bubbles: true,\n cancelable: true\n });\n onSelect === null || onSelect === void 0 ? void 0 : onSelect(itemSelectEvent);\n\n if (!itemSelectEvent.defaultPrevented) {\n (_a = DropdownMenuContentProps.onSelect) === null || _a === void 0 ? void 0 : _a.call(DropdownMenuContentProps, itemSelectEvent);\n }\n });\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/dropdownMenu/common.ts?");
3307
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DropdownMenuContentPropsContext\": () => (/* binding */ DropdownMenuContentPropsContext),\n/* harmony export */ \"getDropdownMenuItemClassName\": () => (/* binding */ getDropdownMenuItemClassName),\n/* harmony export */ \"useHandleDropdownMenuItemClick\": () => (/* binding */ useHandleDropdownMenuItemClick)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../constants */ \"../../constants.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"../../utils.ts\");\n\n\n\nconst DropdownMenuContentPropsContext = react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});\nconst getDropdownMenuItemClassName = (className = \"\", selected = false) => {\n return `dropdown-menu-item dropdown-menu-item-base ${className} ${selected ? \"dropdown-menu-item--selected\" : \"\"}`.trim();\n};\nconst useHandleDropdownMenuItemClick = (origOnClick, onSelect) => {\n const DropdownMenuContentProps = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(DropdownMenuContentPropsContext);\n return (0,_utils__WEBPACK_IMPORTED_MODULE_2__.composeEventHandlers)(origOnClick, event => {\n var _a;\n\n const itemSelectEvent = new CustomEvent(_constants__WEBPACK_IMPORTED_MODULE_1__.EVENT.MENU_ITEM_SELECT, {\n bubbles: true,\n cancelable: true\n });\n onSelect === null || onSelect === void 0 ? void 0 : onSelect(itemSelectEvent);\n\n if (!itemSelectEvent.defaultPrevented) {\n (_a = DropdownMenuContentProps.onSelect) === null || _a === void 0 ? void 0 : _a.call(DropdownMenuContentProps, itemSelectEvent);\n }\n });\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/dropdownMenu/common.ts?");
3253
3308
 
3254
3309
  /***/ }),
3255
3310
 
@@ -3304,7 +3359,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
3304
3359
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3305
3360
 
3306
3361
  "use strict";
3307
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AlignBottomIcon\": () => (/* binding */ AlignBottomIcon),\n/* harmony export */ \"AlignLeftIcon\": () => (/* binding */ AlignLeftIcon),\n/* harmony export */ \"AlignRightIcon\": () => (/* binding */ AlignRightIcon),\n/* harmony export */ \"AlignTopIcon\": () => (/* binding */ AlignTopIcon),\n/* harmony export */ \"ArrowIcon\": () => (/* binding */ ArrowIcon),\n/* harmony export */ \"ArrowRightIcon\": () => (/* binding */ ArrowRightIcon),\n/* harmony export */ \"ArrowheadArrowIcon\": () => (/* binding */ ArrowheadArrowIcon),\n/* harmony export */ \"ArrowheadBarIcon\": () => (/* binding */ ArrowheadBarIcon),\n/* harmony export */ \"ArrowheadDotIcon\": () => (/* binding */ ArrowheadDotIcon),\n/* harmony export */ \"ArrowheadNoneIcon\": () => (/* binding */ ArrowheadNoneIcon),\n/* harmony export */ \"ArrowheadTriangleIcon\": () => (/* binding */ ArrowheadTriangleIcon),\n/* harmony export */ \"BringForwardIcon\": () => (/* binding */ BringForwardIcon),\n/* harmony export */ \"BringToFrontIcon\": () => (/* binding */ BringToFrontIcon),\n/* harmony export */ \"CenterHorizontallyIcon\": () => (/* binding */ CenterHorizontallyIcon),\n/* harmony export */ \"CenterVerticallyIcon\": () => (/* binding */ CenterVerticallyIcon),\n/* harmony export */ \"CloseIcon\": () => (/* binding */ CloseIcon),\n/* harmony export */ \"DiamondIcon\": () => (/* binding */ DiamondIcon),\n/* harmony export */ \"DiscordIcon\": () => (/* binding */ DiscordIcon),\n/* harmony export */ \"DistributeHorizontallyIcon\": () => (/* binding */ DistributeHorizontallyIcon),\n/* harmony export */ \"DistributeVerticallyIcon\": () => (/* binding */ DistributeVerticallyIcon),\n/* harmony export */ \"DotsIcon\": () => (/* binding */ DotsIcon),\n/* harmony export */ \"DuplicateIcon\": () => (/* binding */ DuplicateIcon),\n/* harmony export */ \"EdgeRoundIcon\": () => (/* binding */ EdgeRoundIcon),\n/* harmony export */ \"EdgeSharpIcon\": () => (/* binding */ EdgeSharpIcon),\n/* harmony export */ \"EllipseIcon\": () => (/* binding */ EllipseIcon),\n/* harmony export */ \"EmbedIcon\": () => (/* binding */ EmbedIcon),\n/* harmony export */ \"EraserIcon\": () => (/* binding */ EraserIcon),\n/* harmony export */ \"ExcalLogo\": () => (/* binding */ ExcalLogo),\n/* harmony export */ \"ExportIcon\": () => (/* binding */ ExportIcon),\n/* harmony export */ \"ExportImageIcon\": () => (/* binding */ ExportImageIcon),\n/* harmony export */ \"ExternalLinkIcon\": () => (/* binding */ ExternalLinkIcon),\n/* harmony export */ \"FillCrossHatchIcon\": () => (/* binding */ FillCrossHatchIcon),\n/* harmony export */ \"FillHachureIcon\": () => (/* binding */ FillHachureIcon),\n/* harmony export */ \"FillSolidIcon\": () => (/* binding */ FillSolidIcon),\n/* harmony export */ \"FillZigZagIcon\": () => (/* binding */ FillZigZagIcon),\n/* harmony export */ \"FontFamilyCodeIcon\": () => (/* binding */ FontFamilyCodeIcon),\n/* harmony export */ \"FontFamilyLocalFontIcon\": () => (/* binding */ FontFamilyLocalFontIcon),\n/* harmony export */ \"FontFamilyNormalIcon\": () => (/* binding */ FontFamilyNormalIcon),\n/* harmony export */ \"FontSizeExtraLargeIcon\": () => (/* binding */ FontSizeExtraLargeIcon),\n/* harmony export */ \"FontSizeLargeIcon\": () => (/* binding */ FontSizeLargeIcon),\n/* harmony export */ \"FontSizeMediumIcon\": () => (/* binding */ FontSizeMediumIcon),\n/* harmony export */ \"FontSizeSmallIcon\": () => (/* binding */ FontSizeSmallIcon),\n/* harmony export */ \"FreedrawIcon\": () => (/* binding */ FreedrawIcon),\n/* harmony export */ \"GithubIcon\": () => (/* binding */ GithubIcon),\n/* harmony export */ \"GroupIcon\": () => (/* binding */ GroupIcon),\n/* harmony export */ \"HamburgerMenuIcon\": () => (/* binding */ HamburgerMenuIcon),\n/* harmony export */ \"HelpIcon\": () => (/* binding */ HelpIcon),\n/* harmony export */ \"ImageIcon\": () => (/* binding */ ImageIcon),\n/* harmony export */ \"LibraryIcon\": () => (/* binding */ LibraryIcon),\n/* harmony export */ \"LineIcon\": () => (/* binding */ LineIcon),\n/* harmony export */ \"LinkIcon\": () => (/* binding */ LinkIcon),\n/* harmony export */ \"LoadIcon\": () => (/* binding */ LoadIcon),\n/* harmony export */ \"LockedIcon\": () => (/* binding */ LockedIcon),\n/* harmony export */ \"MoonIcon\": () => (/* binding */ MoonIcon),\n/* harmony export */ \"PenModeIcon\": () => (/* binding */ PenModeIcon),\n/* harmony export */ \"PinIcon\": () => (/* binding */ PinIcon),\n/* harmony export */ \"PlusIcon\": () => (/* binding */ PlusIcon),\n/* harmony export */ \"PlusPromoIcon\": () => (/* binding */ PlusPromoIcon),\n/* harmony export */ \"RectangleIcon\": () => (/* binding */ RectangleIcon),\n/* harmony export */ \"RedoIcon\": () => (/* binding */ RedoIcon),\n/* harmony export */ \"SelectionIcon\": () => (/* binding */ SelectionIcon),\n/* harmony export */ \"SendBackwardIcon\": () => (/* binding */ SendBackwardIcon),\n/* harmony export */ \"SendToBackIcon\": () => (/* binding */ SendToBackIcon),\n/* harmony export */ \"SloppinessArchitectIcon\": () => (/* binding */ SloppinessArchitectIcon),\n/* harmony export */ \"SloppinessArtistIcon\": () => (/* binding */ SloppinessArtistIcon),\n/* harmony export */ \"SloppinessCartoonistIcon\": () => (/* binding */ SloppinessCartoonistIcon),\n/* harmony export */ \"StrokeStyleDashedIcon\": () => (/* binding */ StrokeStyleDashedIcon),\n/* harmony export */ \"StrokeStyleDottedIcon\": () => (/* binding */ StrokeStyleDottedIcon),\n/* harmony export */ \"StrokeStyleSolidIcon\": () => (/* binding */ StrokeStyleSolidIcon),\n/* harmony export */ \"StrokeWidthBaseIcon\": () => (/* binding */ StrokeWidthBaseIcon),\n/* harmony export */ \"StrokeWidthBoldIcon\": () => (/* binding */ StrokeWidthBoldIcon),\n/* harmony export */ \"StrokeWidthExtraBoldIcon\": () => (/* binding */ StrokeWidthExtraBoldIcon),\n/* harmony export */ \"StrokeWidthThinIcon\": () => (/* binding */ StrokeWidthThinIcon),\n/* harmony export */ \"SunIcon\": () => (/* binding */ SunIcon),\n/* harmony export */ \"TextAlignBottomIcon\": () => (/* binding */ TextAlignBottomIcon),\n/* harmony export */ \"TextAlignCenterIcon\": () => (/* binding */ TextAlignCenterIcon),\n/* harmony export */ \"TextAlignLeftIcon\": () => (/* binding */ TextAlignLeftIcon),\n/* harmony export */ \"TextAlignMiddleIcon\": () => (/* binding */ TextAlignMiddleIcon),\n/* harmony export */ \"TextAlignRightIcon\": () => (/* binding */ TextAlignRightIcon),\n/* harmony export */ \"TextAlignTopIcon\": () => (/* binding */ TextAlignTopIcon),\n/* harmony export */ \"TextIcon\": () => (/* binding */ TextIcon),\n/* harmony export */ \"TrashIcon\": () => (/* binding */ TrashIcon),\n/* harmony export */ \"TwitterIcon\": () => (/* binding */ TwitterIcon),\n/* harmony export */ \"UndoIcon\": () => (/* binding */ UndoIcon),\n/* harmony export */ \"UngroupIcon\": () => (/* binding */ UngroupIcon),\n/* harmony export */ \"UnlockedIcon\": () => (/* binding */ UnlockedIcon),\n/* harmony export */ \"WelcomeScreenHelpArrow\": () => (/* binding */ WelcomeScreenHelpArrow),\n/* harmony export */ \"WelcomeScreenMenuArrow\": () => (/* binding */ WelcomeScreenMenuArrow),\n/* harmony export */ \"WelcomeScreenTopToolbarArrow\": () => (/* binding */ WelcomeScreenTopToolbarArrow),\n/* harmony export */ \"ZoomInIcon\": () => (/* binding */ ZoomInIcon),\n/* harmony export */ \"ZoomOutIcon\": () => (/* binding */ ZoomOutIcon),\n/* harmony export */ \"alertTriangleIcon\": () => (/* binding */ alertTriangleIcon),\n/* harmony export */ \"back\": () => (/* binding */ back),\n/* harmony export */ \"checkIcon\": () => (/* binding */ checkIcon),\n/* harmony export */ \"clipboard\": () => (/* binding */ clipboard),\n/* harmony export */ \"clone\": () => (/* binding */ clone),\n/* harmony export */ \"copyIcon\": () => (/* binding */ copyIcon),\n/* harmony export */ \"createIcon\": () => (/* binding */ createIcon),\n/* harmony export */ \"done\": () => (/* binding */ done),\n/* harmony export */ \"downloadIcon\": () => (/* binding */ downloadIcon),\n/* harmony export */ \"eraser\": () => (/* binding */ eraser),\n/* harmony export */ \"exportToFileIcon\": () => (/* binding */ exportToFileIcon),\n/* harmony export */ \"extraToolsIcon\": () => (/* binding */ extraToolsIcon),\n/* harmony export */ \"eyeDropperIcon\": () => (/* binding */ eyeDropperIcon),\n/* harmony export */ \"file\": () => (/* binding */ file),\n/* harmony export */ \"frameToolIcon\": () => (/* binding */ frameToolIcon),\n/* harmony export */ \"handIcon\": () => (/* binding */ handIcon),\n/* harmony export */ \"helpIcon\": () => (/* binding */ helpIcon),\n/* harmony export */ \"menu\": () => (/* binding */ menu),\n/* harmony export */ \"mermaidLogoIcon\": () => (/* binding */ mermaidLogoIcon),\n/* harmony export */ \"palette\": () => (/* binding */ palette),\n/* harmony export */ \"playerPlayIcon\": () => (/* binding */ playerPlayIcon),\n/* harmony export */ \"playerStopFilledIcon\": () => (/* binding */ playerStopFilledIcon),\n/* harmony export */ \"publishIcon\": () => (/* binding */ publishIcon),\n/* harmony export */ \"questionCircle\": () => (/* binding */ questionCircle),\n/* harmony export */ \"resetZoom\": () => (/* binding */ resetZoom),\n/* harmony export */ \"save\": () => (/* binding */ save),\n/* harmony export */ \"saveAs\": () => (/* binding */ saveAs),\n/* harmony export */ \"share\": () => (/* binding */ share),\n/* harmony export */ \"shareIOS\": () => (/* binding */ shareIOS),\n/* harmony export */ \"shareWindows\": () => (/* binding */ shareWindows),\n/* harmony export */ \"shield\": () => (/* binding */ shield),\n/* harmony export */ \"start\": () => (/* binding */ start),\n/* harmony export */ \"stop\": () => (/* binding */ stop),\n/* harmony export */ \"tablerCheckIcon\": () => (/* binding */ tablerCheckIcon),\n/* harmony export */ \"usersIcon\": () => (/* binding */ usersIcon),\n/* harmony export */ \"zoomIn\": () => (/* binding */ zoomIn),\n/* harmony export */ \"zoomOut\": () => (/* binding */ zoomOut)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var open_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! open-color */ \"../../../node_modules/open-color/open-color.json\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! clsx */ \"../../../node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n //\n// All icons are imported from https://fontawesome.com/icons?d=gallery\n// Icons are under the license https://fontawesome.com/license\n//\n// Note: when adding new icons, review https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/RTL_Guidelines\n// to determine whether or not the icons should be mirrored in right-to-left languages.\n\n\n\n\n\n\nconst iconFillColor = theme => \"var(--icon-fill-color)\";\n\nconst handlerColor = theme => theme === _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.LIGHT ? open_color__WEBPACK_IMPORTED_MODULE_2__.white : \"#1e1e1e\";\n\nconst createIcon = (d, opts = 512) => {\n const _a = typeof opts === \"number\" ? {\n width: opts\n } : opts,\n {\n width = 512,\n height = width,\n mirror,\n style\n } = _a,\n rest = __rest(_a, [\"width\", \"height\", \"mirror\", \"style\"]);\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"svg\", Object.assign({\n \"aria-hidden\": \"true\",\n focusable: \"false\",\n role: \"img\",\n viewBox: `0 0 ${width} ${height}`,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({\n \"rtl-mirror\": mirror\n }),\n style: style\n }, rest, {\n children: typeof d === \"string\" ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"var(--icon-fill-color)\",\n d: d\n }) : d\n }));\n};\nconst tablerIconProps = {\n width: 24,\n height: 24,\n fill: \"none\",\n strokeWidth: 2,\n stroke: \"var(--icon-fill-color)\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\nconst modifiedTablerIconProps = {\n width: 20,\n height: 20,\n fill: \"none\",\n stroke: \"var(--icon-fill-color)\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}; // -----------------------------------------------------------------------------\n// tabler-icons: present\n\nconst PlusPromoIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: 3,\n y: 8,\n width: 18,\n height: 4,\n rx: 1\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: 12,\n y1: 8,\n x2: 12,\n y2: 21\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5\"\n })]\n})), tablerIconProps); // tabler-icons: book\n\nconst LibraryIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"3\",\n y1: \"6\",\n x2: \"3\",\n y2: \"19\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"12\",\n y1: \"6\",\n x2: \"12\",\n y2: \"19\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"21\",\n y1: \"6\",\n x2: \"21\",\n y2: \"19\"\n })]\n})), tablerIconProps); // tabler-icons: plus\n\nconst PlusIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"svg\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"12\",\n y1: \"5\",\n x2: \"12\",\n y2: \"19\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"5\",\n y1: \"12\",\n x2: \"19\",\n y2: \"12\"\n })]\n})), tablerIconProps); // tabler-icons: dots-vertical\n\nconst DotsIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"1\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n cx: \"12\",\n cy: \"19\",\n r: \"1\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n cx: \"12\",\n cy: \"5\",\n r: \"1\"\n })]\n})), tablerIconProps); // tabler-icons: pinned\n\nconst PinIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"svg\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M9 4v6l-2 4v2h10v-2l-2 -4v-6\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"12\",\n y1: \"16\",\n x2: \"12\",\n y2: \"21\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"8\",\n y1: \"4\",\n x2: \"16\",\n y2: \"4\"\n })]\n})), tablerIconProps); // tabler-icons: lock-open (via Figma)\n\nconst UnlockedIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: \"1.25\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: \"1.25\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"mask\", Object.assign({\n id: \"UnlockedIcon\",\n style: {\n maskType: \"alpha\"\n },\n maskUnits: \"userSpaceOnUse\",\n x: 6,\n y: 1,\n width: 9,\n height: 9\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481\",\n fill: \"#fff\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n mask: \"url(#UnlockedIcon)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n\n })\n }))]\n}), modifiedTablerIconProps); // tabler-icons: lock (via Figma)\n\nconst LockedIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916\"\n })]\n})), modifiedTablerIconProps); // custom\n\nconst WelcomeScreenMenuArrow = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: 2,\n strokeLinecap: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })]\n}), {\n width: 41,\n height: 94,\n fill: \"none\"\n}); // custom\n\nconst WelcomeScreenHelpArrow = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: 2,\n strokeLinecap: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })]\n}), {\n width: 85,\n height: 71,\n fill: \"none\"\n}); // custom\n\nconst WelcomeScreenTopToolbarArrow = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: 2,\n strokeLinecap: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })]\n}), {\n width: 38,\n height: 78,\n fill: \"none\"\n}); // custom\n\nconst ExcalLogo = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n fill: \"--icon-fill-color\"\n}, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z\",\n fill: \"--icon-fill-color\"\n })\n})), {\n width: 40,\n height: 40,\n fill: \"none\"\n}); // custom\n\nconst SelectionIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.5 13.5l4.5 4.5\"\n })]\n})), {\n fill: \"none\",\n width: 22,\n height: 22,\n strokeWidth: 1.25\n}); // tabler-icons: square\n\nconst RectangleIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"4\",\n y: \"4\",\n width: \"16\",\n height: \"16\",\n rx: \"2\"\n })]\n})), tablerIconProps); // tabler-icons: square-rotated\n\nconst DiamondIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z\"\n })]\n})), tablerIconProps); // tabler-icons: circle\n\nconst EllipseIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"9\"\n })]\n})), tablerIconProps); // tabler-icons: arrow-narrow-right\n\nconst ArrowIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"5\",\n y1: \"12\",\n x2: \"19\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"15\",\n y1: \"16\",\n x2: \"19\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"15\",\n y1: \"8\",\n x2: \"19\",\n y2: \"12\"\n })]\n})), tablerIconProps); // custom?\n\nconst LineIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.167 10h11.666\",\n strokeWidth: \"1.5\"\n}), modifiedTablerIconProps);\nconst PenModeIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16 7h4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3\"\n })]\n})), tablerIconProps); // modified tabler-icons: pencil\n\nconst FreedrawIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n clipRule: \"evenodd\",\n d: \"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m11.25 5.417 3.333 3.333\"\n })]\n})), modifiedTablerIconProps); // tabler-icons: typography\n\nconst TextIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"20\",\n x2: \"7\",\n y2: \"20\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"14\",\n y1: \"20\",\n x2: \"21\",\n y2: \"20\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"6.9\",\n y1: \"15\",\n x2: \"13.8\",\n y2: \"15\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"10.2\",\n y1: \"6.3\",\n x2: \"16\",\n y2: \"20\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"polyline\", {\n points: \"5 20 11 4 13 4 20 20\"\n })]\n})), tablerIconProps); // modified tabler-icons: photo\n\nconst ImageIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.5 6.667h.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667\"\n })]\n})), modifiedTablerIconProps); // tabler-icons: eraser\n\nconst EraserIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M18 13.3l-6.3 -6.3\"\n })]\n})), tablerIconProps);\nconst ZoomInIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n strokeWidth: \"1.25\",\n d: \"M10 4.167v11.666M4.167 10h11.666\"\n}), modifiedTablerIconProps);\nconst ZoomOutIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 10h10\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst TrashIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n strokeWidth: \"1.25\",\n d: \"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5\"\n}), modifiedTablerIconProps);\nconst EmbedIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"polyline\", {\n points: \"12 16 18 10 12 4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"polyline\", {\n points: \"8 4 2 10 8 16\"\n })]\n})), modifiedTablerIconProps);\nconst DuplicateIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n clipRule: \"evenodd\",\n d: \"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z\"\n })]\n})), modifiedTablerIconProps);\nconst MoonIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n clipRule: \"evenodd\",\n d: \"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n\n}), modifiedTablerIconProps);\nconst SunIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667\"\n })\n})), modifiedTablerIconProps);\nconst HamburgerMenuIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"6\",\n x2: \"20\",\n y2: \"6\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"12\",\n x2: \"20\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"18\",\n x2: \"20\",\n y2: \"18\"\n })]\n})), tablerIconProps);\nconst ExportIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n strokeWidth: \"1.25\",\n d: \"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10\"\n}), modifiedTablerIconProps);\nconst HelpIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"9\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"12\",\n y1: \"17\",\n x2: \"12\",\n y2: \"17.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4\"\n })]\n})), tablerIconProps);\nconst ExternalLinkIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n strokeWidth: \"1.25\",\n d: \"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5\"\n}), modifiedTablerIconProps);\nconst GithubIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst DiscordIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084\"\n })]\n})), modifiedTablerIconProps);\nconst TwitterIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z\"\n })]\n})), tablerIconProps);\nconst checkIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"polyline\", {\n fill: \"none\",\n stroke: \"var(--icon-fill-color)\",\n points: \"20 6 9 17 4 12\"\n}), {\n width: 24,\n height: 24\n});\nconst LinkIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416\"\n })]\n})), modifiedTablerIconProps);\nconst save = createIcon(\"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z\", {\n width: 448,\n height: 512\n});\nconst saveAs = createIcon(\"M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z\", {\n width: 448,\n height: 512\n}); // tabler-icon: folder\n\nconst LoadIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst clipboard = createIcon(\"M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z\", {\n width: 384,\n height: 512\n});\nconst palette = createIcon(\"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z\");\nconst ExportImageIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M15 8h.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M19 16v6\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M22 19l-3 3l-3 -3\"\n })]\n})), tablerIconProps);\nconst exportToFileIcon = createIcon(\"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z\", {\n width: 512,\n height: 512\n});\nconst zoomIn = createIcon(\"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z\", {\n width: 448,\n height: 512\n});\nconst zoomOut = createIcon(\"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z\", {\n width: 448,\n height: 512\n});\nconst done = createIcon(\"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z\");\nconst menu = createIcon(\"M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z\");\nconst UndoIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst RedoIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst questionCircle = createIcon(\"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z\", {\n mirror: true\n});\nconst share = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834\",\n strokeWidth: \"1.5\"\n}), modifiedTablerIconProps);\nconst shareIOS = createIcon(\"M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z\", {\n width: 24,\n height: 24\n});\nconst shareWindows = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"var(--icon-fill-color)\" //zsviczian\n ,\n d: \"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n fill: \"var(--icon-fill-color)\" //zsviczian\n ,\n d: \"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z\"\n })]\n}), {\n width: 64,\n height: 64\n}); // Icon imported form Storybook\n// Storybook is licensed under MIT https://github.com/storybookjs/storybook/blob/next/LICENSE\n\nconst resetZoom = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: \"40\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n ,\n d: \"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z\"\n}), {\n width: 1024\n});\nconst BringForwardIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.889 4.167H8.333c-.767 0-1.389.622-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.767-.622-1.39-1.39-1.39Z\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.5 12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst SendBackwardIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M6.944 12.5H12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.889 4.167H8.333c-.767 0-1.389.621-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.768-.622-1.39-1.39-1.39Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst BringToFrontIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M8.775 6.458h2.45a2.316 2.316 0 0 1 2.317 2.316v2.452a2.316 2.316 0 0 1-2.316 2.316H8.774a2.316 2.316 0 0 1-2.317-2.316V8.774a2.316 2.316 0 0 1 2.317-2.316Z\",\n fill: \"var(--icon-fill-color)\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316ZM12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst SendToBackIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"mask\", Object.assign({\n id: \"SendToBackIcon\",\n fill: \"#fff\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z\",\n fill: \"var(--icon-fill-color)\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M9.167 5.833h1.25v-1.25h-1.25v1.25Zm5 5h1.25v-1.25h-1.25v1.25Zm-3.334 3.334h-1.25v1.25h1.25v-1.25Zm-5-5h-1.25v1.25h1.25v-1.25Zm2.084-3.334v2.06h2.5v-2.06h-2.5Zm0 2.06a4.191 4.191 0 0 0 4.19 4.19v-2.5a1.691 1.691 0 0 1-1.69-1.69h-2.5Zm4.19 4.19h2.06v-2.5h-2.06v2.5Zm.81-1.25v.393h2.5v-.393h-2.5Zm0 .393c0 .933-.758 1.69-1.691 1.69v2.5a4.191 4.191 0 0 0 4.19-4.19h-2.5Zm-1.691 1.69h-.393v2.5h.393v-2.5Zm.857 1.25v-2.058h-2.5v2.059h2.5Zm0-2.058a4.191 4.191 0 0 0-4.19-4.191v2.5c.933 0 1.69.757 1.69 1.69h2.5Zm-4.19-4.191h-2.06v2.5h2.06v-2.5Zm-.81 1.25v-.393h-2.5v.393h2.5Zm0-.393c0-.934.758-1.69 1.692-1.69v-2.5a4.191 4.191 0 0 0-4.192 4.19h2.5Zm1.692-1.69h.392v-2.5h-.392v2.5Z\",\n fill: \"var(--icon-fill-color)\",\n mask: \"url(#SendToBackIcon)\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps); //\n// Align action icons created from scratch to match those of z-index actions\n// Note: vertical align icons are flipped so the larger item is always the\n// first one the user sees. Horizontal align icons should not be flipped since\n// that would make them lie about their function.\n//\n\nconst AlignTopIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.333 3.333h13.334\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst AlignBottomIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.333 16.667h13.334\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst AlignLeftIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.333 3.333v13.334\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst AlignRightIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.667 3.333v13.334\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst DistributeHorizontallyIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.667 3.333v13.334M3.333 3.333v13.334\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst DistributeVerticallyIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.333 3.333h13.334M3.333 16.667h13.334\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst CenterVerticallyIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M1.667 10h2.916\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M8.333 10h3.334\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M15.417 10h2.916\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z\"\n })]\n})), modifiedTablerIconProps);\nconst CenterHorizontallyIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 18.333v-2.916\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 11.667V8.333\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 4.583V1.667\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z\"\n })]\n})), modifiedTablerIconProps);\nconst usersIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n cx: \"9\",\n cy: \"7\",\n r: \"4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16 3.13a4 4 0 0 1 0 7.75\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M21 21v-2a4 4 0 0 0 -3 -3.85\"\n })]\n})), tablerIconProps); // not mirrored because it's inspired by a playback control, which is always RTL\n\nconst start = createIcon(\"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z\");\nconst stop = createIcon(\"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z\");\nconst CloseIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M15 5 5 15M5 5l10 10\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst back = createIcon(\"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z\", {\n width: 320,\n height: 512,\n style: {\n marginLeft: \"-0.2rem\"\n },\n mirror: true\n});\nconst clone = createIcon(\"M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z\", {\n mirror: true\n}); // modified https://feathericons.com/?query=shield\n\nconst shield = createIcon(\"M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z\", {\n width: 24\n});\nconst file = createIcon(\"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z\", {\n width: 384,\n height: 512\n}); // TODO barnabasmolnar/editor-redesign\n// couldn't find a new icon for this\n\nconst GroupIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n theme\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M25 26H111V111H25\",\n fill: iconFillColor(theme)\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z\",\n stroke: iconFillColor(theme),\n strokeWidth: \"2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M100 100H160V160H100\",\n fill: iconFillColor(theme)\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z\",\n stroke: iconFillColor(theme),\n strokeWidth: \"2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n fill: handlerColor(theme),\n stroke: iconFillColor(theme),\n strokeWidth: \"6\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"2.5\",\n y: \"2.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"2.5\",\n y: \"149.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"147.5\",\n y: \"149.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"147.5\",\n y: \"2.5\",\n width: \"30\",\n height: \"30\"\n })]\n }))]\n}), {\n width: 182,\n height: 182,\n mirror: true\n}));\nconst UngroupIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n theme\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M25 26H111V111H25\",\n fill: iconFillColor(theme)\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z\",\n stroke: iconFillColor(theme),\n strokeWidth: \"2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M100 100H160V160H100\",\n fill: iconFillColor(theme)\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z\",\n stroke: iconFillColor(theme),\n strokeWidth: \"2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n fill: handlerColor(theme),\n stroke: iconFillColor(theme),\n strokeWidth: \"6\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"2.5\",\n y: \"2.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"78.5\",\n y: \"149.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"147.5\",\n y: \"149.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"147.5\",\n y: \"78.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"105.5\",\n y: \"2.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"2.5\",\n y: \"102.5\",\n width: \"30\",\n height: \"30\"\n })]\n }))]\n}), {\n width: 182,\n height: 182,\n mirror: true\n}));\nconst FillZigZagIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n strokeWidth: 1.25\n}, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793\"\n })\n})), modifiedTablerIconProps);\nconst FillHachureIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"mask\", Object.assign({\n id: \"FillHachureIcon\",\n style: {\n maskType: \"alpha\"\n },\n maskUnits: \"userSpaceOnUse\",\n x: 2,\n y: 2,\n width: 16,\n height: 16\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z\",\n fill: \"var(--icon-fill-color)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n mask: \"url(#FillHachureIcon)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n }))]\n}), modifiedTablerIconProps);\nconst FillCrossHatchIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"mask\", Object.assign({\n id: \"FillCrossHatchIcon\",\n style: {\n maskType: \"alpha\"\n },\n maskUnits: \"userSpaceOnUse\",\n x: -1,\n y: -1,\n width: 22,\n height: 22\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n mask: \"url(#FillCrossHatchIcon)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z\",\n fill: \"var(--icon-fill-color)\"\n })\n }))]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst FillSolidIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n clipPath: \"url(#a)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), Object.assign(Object.assign({}, modifiedTablerIconProps), {\n fill: \"var(--icon-fill-color)\"\n}));\nconst StrokeWidthThinIcon = createIcon( //zsviczian\n(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.167 10h11.666\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"0.75\" //zsviczian\n ,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n}), modifiedTablerIconProps);\nconst StrokeWidthBaseIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.167 10h11.666\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"2.25\" //zsviczian\n ,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n}), modifiedTablerIconProps);\nconst StrokeWidthBoldIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 10h10\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"3.5\" //zsviczian\n ,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), modifiedTablerIconProps);\nconst StrokeWidthExtraBoldIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 10h10\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"5.75\" //zsviczian\n ,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), modifiedTablerIconProps);\nconst StrokeStyleSolidIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n theme\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6 10H34\",\n stroke: iconFillColor(theme),\n strokeWidth: 2,\n fill: \"none\",\n strokeLinecap: \"round\"\n}), {\n width: 40,\n height: 20\n}));\nconst StrokeStyleDashedIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"2\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 12h2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M17 12h2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M11 12h2\"\n })]\n})), tablerIconProps); // tabler-icons: line-dotted\n\nconst StrokeStyleDottedIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"2\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 12v.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M8 12v.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 12v.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16 12v.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M20 12v.01\"\n })]\n})), tablerIconProps);\nconst SloppinessArchitectIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst SloppinessArtistIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst SloppinessCartoonistIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst EdgeSharpIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"svg\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.3333 3.33331V3.34331\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.6667 3.33331V3.34331\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.6667 6.66669V6.67669\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.6667 10V10.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.33334 13.3333V13.3433\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.6667 13.3333V13.3433\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.33334 16.6667V16.6767\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6.66666 16.6667V16.6767\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 16.6667V16.6767\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.3333 16.6667V16.6767\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.6667 16.6667V16.6767\"\n })]\n})), modifiedTablerIconProps); // tabler-icons: border-radius\n\nconst EdgeRoundIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\",\n stroke: \"var(--icon-fill-color)\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 12v-4a4 4 0 0 1 4 -4h4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"16\",\n y1: \"4\",\n x2: \"16\",\n y2: \"4.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"20\",\n y1: \"4\",\n x2: \"20\",\n y2: \"4.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"20\",\n y1: \"8\",\n x2: \"20\",\n y2: \"8.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"20\",\n y1: \"12\",\n x2: \"20\",\n y2: \"12.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"16\",\n x2: \"4\",\n y2: \"16.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"20\",\n y1: \"16\",\n x2: \"20\",\n y2: \"16.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"20\",\n x2: \"4\",\n y2: \"20.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"8\",\n y1: \"20\",\n x2: \"8\",\n y2: \"20.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"12\",\n y1: \"20\",\n x2: \"12\",\n y2: \"20.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"16\",\n y1: \"20\",\n x2: \"16\",\n y2: \"20.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"20\",\n y1: \"20\",\n x2: \"20\",\n y2: \"20.01\"\n })]\n})), tablerIconProps);\nconst ArrowheadNoneIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6 10H34\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: 2,\n fill: \"none\"\n}), {\n width: 40,\n height: 20\n});\nconst ArrowheadArrowIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n flip = false\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n transform: flip ? \"translate(40, 0) scale(-1, 1)\" : \"\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: 2,\n fill: \"none\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M34 10H6M34 10L27 5M34 10L27 15\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M27.5 5L34.5 10L27.5 15\"\n })]\n})), {\n width: 40,\n height: 20\n}));\nconst ArrowheadDotIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n flip = false\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n fill: \"var(--icon-fill-color)\",\n transform: flip ? \"translate(40, 0) scale(-1, 1)\" : \"\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M32 10L6 10\",\n strokeWidth: 2\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n r: \"4\",\n transform: \"matrix(-1 0 0 1 30 10)\"\n })]\n})), {\n width: 40,\n height: 20\n}));\nconst ArrowheadBarIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n flip = false\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n transform: flip ? \"translate(40, 0) scale(-1, 1)\" : \"\"\n}, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M34 10H5.99996M34 10L34 5M34 10L34 15\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: 2,\n fill: \"none\"\n })\n})), {\n width: 40,\n height: 20\n}));\nconst ArrowheadTriangleIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n flip = false\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n fill: \"var(--icon-fill-color)\",\n transform: flip ? \"translate(40, 0) scale(-1, 1)\" : \"\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M32 10L6 10\",\n strokeWidth: 2\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5\"\n })]\n})), {\n width: 40,\n height: 20\n}));\nconst FontSizeSmallIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n clipPath: \"url(#a)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst FontSizeMediumIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n clipPath: \"url(#a)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 16.667V3.333L10 15l5-11.667v13.334\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst FontSizeLargeIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n clipPath: \"url(#a)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.833 3.333v13.334h8.334\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst FontSizeExtraLargeIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n}), modifiedTablerIconProps);\nconst FontFamilyNormalIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334\"\n })\n }))\n}), modifiedTablerIconProps);\nconst FontFamilyCodeIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst FontFamilyLocalFontIcon = createIcon( //zsviczian\n(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m 151.43258,8.7863685 q -7.87381,6.7489805 -14.62279,12.3731315 0,11.248301 0,23.621433 8.99864,35.994564 13.49796,76.488447 -4.49932,7.87381 -11.2483,13.49796 -16.87245,1.12483 -29.24559,-3.37449 -6.74898,-4.49932 -10.123467,-11.2483 -7.87381,-2.24966 -15.747621,0 -6.748981,1.12483 -11.248302,5.62415 l -16.872451,16.87245 q -11.248302,2.24966 -19.122113,8.99864 -6.74898,6.74899 -6.74898,17.99729 2.24966,3.37449 4.49932,7.87381 2.24966,4.49932 2.24966,12.37313 -16.872452,31.49524 -30.3704131,65.24015 -2.2496602,23.62143 0,47.24286 6.7489811,10.12347 15.7476221,20.24694 10.123471,4.49932 20.246942,13.49797 25.871093,4.49932 53.991846,8.99864 23.621437,-5.62415 50.617357,-5.62415 3.37449,2.24966 6.74898,5.62415 0,25.87109 0,55.11667 1.12483,19.12211 5.62415,38.24423 v 61.86565 q 2.24966,5.62415 8.99864,8.99864 10.12347,0 19.12211,-3.37449 3.37449,2.24966 10.12347,2.24966 7.87382,-13.49796 17.99729,-24.74626 5.62415,-34.86973 7.87381,-70.8643 -5.62415,-40.49388 -5.62415,-82.1126 l 7.87381,-7.87381 h 16.87245 q 21.37177,-8.99864 44.9932,-13.49796 14.6228,-7.87381 30.37042,-15.74762 3.37449,-1.12483 8.99864,-1.12483 11.2483,-10.12347 23.62143,-22.4966 2.24966,-6.74898 6.74898,-12.37313 V 230.3779 q 4.49932,-14.62279 6.74898,-30.37041 4.49932,-11.2483 10.12347,-20.24694 2.24966,-17.99728 2.24966,-37.1194 -5.62415,-7.87381 -7.87381,-15.74762 -6.74898,-6.74898 -13.49796,-13.49796 -11.2483,-6.74898 -20.24694,-10.12347 -46.11804,-4.499321 -92.23607,0 -10.12347,4.49932 -22.4966,4.49932 -6.74898,-2.24966 -10.12347,-7.873811 2.24966,-23.621433 2.24966,-46.118035 -5.62415,-8.998641 -4.49932,-19.122113 Q 203.17477,22.28433 195.30095,13.285689 187.42714,3.1622179 178.4285,2.0373877 164.93054,5.4118781 151.43258,8.7863685 Z M 136.80979,175.26123 q 7.87381,2.24966 11.2483,12.37313 -1.12483,39.36905 1.12483,80.98777 4.49932,6.74898 3.37449,15.74762 -5.62415,6.74898 -12.37313,11.2483 -17.99728,1.12483 -33.74491,5.62415 -19.122108,0 -37.11939,-1.12483 -6.748981,-4.49932 -11.248301,-7.87381 -1.12483,-14.62279 1.12483,-29.24558 16.872452,-30.37042 28.120753,-62.99049 4.499321,-7.87381 11.248301,-13.49796 14.622787,-3.37449 29.245587,-5.62415 4.49932,-3.37449 8.99864,-5.62415 z M 283.0377,146.01564 q 8.99865,-1.12483 17.99729,2.24966 4.49932,2.24966 8.99864,7.87382 2.24966,8.99864 1.12483,20.24694 -6.74898,11.2483 -10.12347,22.4966 -4.49932,25.87109 -10.12348,52.86702 -24.74626,11.2483 -47.24286,24.74626 -10.12347,2.24966 -19.12211,4.49932 l -10.12347,-10.12347 q 0,-44.99321 3.37449,-84.36226 -3.37449,-13.49796 -6.74898,-23.62143 4.49932,-6.74898 12.37313,-11.24831 29.24558,-3.37449 59.61599,-5.62415 z M 638.74,93.24 766.76,221.26 488.77,499.25 374.63,511.85 c -15.28,1.69 -28.19,-11.23 -26.49,-26.51 l 12.7,-114.22 z M 845.94,74.18 785.83,14.07 c -18.75,-18.75 -49.16,-18.75 -67.91,0 l -56.55,56.55 128.02,128.02 56.55,-56.55 c 18.75,-18.76 18.75,-49.16 0,-67.91 z\"\n })\n }))\n}));\nconst TextAlignLeftIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"8\",\n x2: \"20\",\n y2: \"8\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"12\",\n x2: \"12\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"16\",\n x2: \"16\",\n y2: \"16\"\n })]\n})), tablerIconProps);\nconst TextAlignCenterIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"8\",\n x2: \"20\",\n y2: \"8\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"8\",\n y1: \"12\",\n x2: \"16\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"6\",\n y1: \"16\",\n x2: \"18\",\n y2: \"16\"\n })]\n})), tablerIconProps);\nconst TextAlignRightIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"8\",\n x2: \"20\",\n y2: \"8\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"10\",\n y1: \"12\",\n x2: \"20\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"8\",\n y1: \"16\",\n x2: \"20\",\n y2: \"16\"\n })]\n})), tablerIconProps); // tabler-icons: layout-align-top\n\nconst TextAlignTopIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n theme\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\",\n stroke: \"var(--icon-fill-color)\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"4\",\n x2: \"20\",\n y2: \"4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"9\",\n y: \"8\",\n width: \"6\",\n height: \"12\",\n rx: \"2\"\n })]\n})), tablerIconProps)); // tabler-icons: layout-align-bottom\n\nconst TextAlignBottomIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n theme\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"2\",\n stroke: \"var(--icon-fill-color)\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"20\",\n x2: \"20\",\n y2: \"20\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"9\",\n y: \"4\",\n width: \"6\",\n height: \"12\",\n rx: \"2\"\n })]\n})), tablerIconProps)); // tabler-icons: layout-align-middle\n\nconst TextAlignMiddleIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n theme\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\",\n stroke: \"var(--icon-fill-color)\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"12\",\n x2: \"9\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"15\",\n y1: \"12\",\n x2: \"20\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"9\",\n y: \"6\",\n width: \"6\",\n height: \"12\",\n rx: \"2\"\n })]\n})), tablerIconProps));\nconst publishIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z\",\n fill: \"var(--icon-fill-color)\"\n}), {\n width: 640,\n height: 512\n});\nconst eraser = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z\"\n}));\nconst handIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: 1.25\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M14 5.5a1.5 1.5 0 0 1 3 0v6.5\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47\"\n })]\n})), tablerIconProps);\nconst downloadIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7 11l5 5l5 -5\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 4l0 12\"\n })]\n}), tablerIconProps);\nconst copyIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2\"\n })]\n}), tablerIconProps);\nconst helpIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 17l0 .01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4\"\n })]\n}), tablerIconProps);\nconst playerPlayIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7 4v16l13 -8z\"\n })]\n}), tablerIconProps);\nconst playerStopFilledIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z\",\n strokeWidth: \"0\",\n fill: \"--icon-fill-color\"\n })]\n}), tablerIconProps);\nconst tablerCheckIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 12l5 5l10 -10\"\n })]\n}), tablerIconProps);\nconst alertTriangleIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 9v4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 17h.01\"\n })]\n}), tablerIconProps);\nconst eyeDropperIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: 1.25\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M11 7l6 6\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z\"\n })]\n})), tablerIconProps);\nconst extraToolsIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: 1.5\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 3l-4 7h8z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z\"\n })]\n})), tablerIconProps);\nconst frameToolIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: 1.5\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 7l16 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 17l16 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7 4l0 16\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M17 4l0 16\"\n })]\n})), tablerIconProps);\nconst mermaidLogoIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"black\",\n d: \"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z\"\n}));\nconst ArrowRightIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.16602 10H15.8327\",\n stroke: \"white\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.5 13.3333L15.8333 10\",\n stroke: \"white\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.5 6.66666L15.8333 9.99999\",\n stroke: \"white\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })]\n}), {\n width: 20,\n height: 20\n});\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/icons.tsx?");
3362
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AlignBottomIcon\": () => (/* binding */ AlignBottomIcon),\n/* harmony export */ \"AlignLeftIcon\": () => (/* binding */ AlignLeftIcon),\n/* harmony export */ \"AlignRightIcon\": () => (/* binding */ AlignRightIcon),\n/* harmony export */ \"AlignTopIcon\": () => (/* binding */ AlignTopIcon),\n/* harmony export */ \"ArrowIcon\": () => (/* binding */ ArrowIcon),\n/* harmony export */ \"ArrowRightIcon\": () => (/* binding */ ArrowRightIcon),\n/* harmony export */ \"ArrowheadArrowIcon\": () => (/* binding */ ArrowheadArrowIcon),\n/* harmony export */ \"ArrowheadBarIcon\": () => (/* binding */ ArrowheadBarIcon),\n/* harmony export */ \"ArrowheadDotIcon\": () => (/* binding */ ArrowheadDotIcon),\n/* harmony export */ \"ArrowheadNoneIcon\": () => (/* binding */ ArrowheadNoneIcon),\n/* harmony export */ \"ArrowheadTriangleIcon\": () => (/* binding */ ArrowheadTriangleIcon),\n/* harmony export */ \"BringForwardIcon\": () => (/* binding */ BringForwardIcon),\n/* harmony export */ \"BringToFrontIcon\": () => (/* binding */ BringToFrontIcon),\n/* harmony export */ \"CenterHorizontallyIcon\": () => (/* binding */ CenterHorizontallyIcon),\n/* harmony export */ \"CenterVerticallyIcon\": () => (/* binding */ CenterVerticallyIcon),\n/* harmony export */ \"CloseIcon\": () => (/* binding */ CloseIcon),\n/* harmony export */ \"DiamondIcon\": () => (/* binding */ DiamondIcon),\n/* harmony export */ \"DiscordIcon\": () => (/* binding */ DiscordIcon),\n/* harmony export */ \"DistributeHorizontallyIcon\": () => (/* binding */ DistributeHorizontallyIcon),\n/* harmony export */ \"DistributeVerticallyIcon\": () => (/* binding */ DistributeVerticallyIcon),\n/* harmony export */ \"DotsIcon\": () => (/* binding */ DotsIcon),\n/* harmony export */ \"DuplicateIcon\": () => (/* binding */ DuplicateIcon),\n/* harmony export */ \"EdgeRoundIcon\": () => (/* binding */ EdgeRoundIcon),\n/* harmony export */ \"EdgeSharpIcon\": () => (/* binding */ EdgeSharpIcon),\n/* harmony export */ \"EllipseIcon\": () => (/* binding */ EllipseIcon),\n/* harmony export */ \"EmbedIcon\": () => (/* binding */ EmbedIcon),\n/* harmony export */ \"EraserIcon\": () => (/* binding */ EraserIcon),\n/* harmony export */ \"ExcalLogo\": () => (/* binding */ ExcalLogo),\n/* harmony export */ \"ExportIcon\": () => (/* binding */ ExportIcon),\n/* harmony export */ \"ExportImageIcon\": () => (/* binding */ ExportImageIcon),\n/* harmony export */ \"ExternalLinkIcon\": () => (/* binding */ ExternalLinkIcon),\n/* harmony export */ \"FillCrossHatchIcon\": () => (/* binding */ FillCrossHatchIcon),\n/* harmony export */ \"FillHachureIcon\": () => (/* binding */ FillHachureIcon),\n/* harmony export */ \"FillSolidIcon\": () => (/* binding */ FillSolidIcon),\n/* harmony export */ \"FillZigZagIcon\": () => (/* binding */ FillZigZagIcon),\n/* harmony export */ \"FontFamilyCodeIcon\": () => (/* binding */ FontFamilyCodeIcon),\n/* harmony export */ \"FontFamilyLocalFontIcon\": () => (/* binding */ FontFamilyLocalFontIcon),\n/* harmony export */ \"FontFamilyNormalIcon\": () => (/* binding */ FontFamilyNormalIcon),\n/* harmony export */ \"FontSizeExtraLargeIcon\": () => (/* binding */ FontSizeExtraLargeIcon),\n/* harmony export */ \"FontSizeLargeIcon\": () => (/* binding */ FontSizeLargeIcon),\n/* harmony export */ \"FontSizeMediumIcon\": () => (/* binding */ FontSizeMediumIcon),\n/* harmony export */ \"FontSizeSmallIcon\": () => (/* binding */ FontSizeSmallIcon),\n/* harmony export */ \"FreedrawIcon\": () => (/* binding */ FreedrawIcon),\n/* harmony export */ \"GithubIcon\": () => (/* binding */ GithubIcon),\n/* harmony export */ \"GroupIcon\": () => (/* binding */ GroupIcon),\n/* harmony export */ \"HamburgerMenuIcon\": () => (/* binding */ HamburgerMenuIcon),\n/* harmony export */ \"HelpIcon\": () => (/* binding */ HelpIcon),\n/* harmony export */ \"ImageIcon\": () => (/* binding */ ImageIcon),\n/* harmony export */ \"LibraryIcon\": () => (/* binding */ LibraryIcon),\n/* harmony export */ \"LineIcon\": () => (/* binding */ LineIcon),\n/* harmony export */ \"LinkIcon\": () => (/* binding */ LinkIcon),\n/* harmony export */ \"LoadIcon\": () => (/* binding */ LoadIcon),\n/* harmony export */ \"LockedIcon\": () => (/* binding */ LockedIcon),\n/* harmony export */ \"MoonIcon\": () => (/* binding */ MoonIcon),\n/* harmony export */ \"PenModeIcon\": () => (/* binding */ PenModeIcon),\n/* harmony export */ \"PinIcon\": () => (/* binding */ PinIcon),\n/* harmony export */ \"PlusIcon\": () => (/* binding */ PlusIcon),\n/* harmony export */ \"PlusPromoIcon\": () => (/* binding */ PlusPromoIcon),\n/* harmony export */ \"RectangleIcon\": () => (/* binding */ RectangleIcon),\n/* harmony export */ \"RedoIcon\": () => (/* binding */ RedoIcon),\n/* harmony export */ \"SelectionIcon\": () => (/* binding */ SelectionIcon),\n/* harmony export */ \"SendBackwardIcon\": () => (/* binding */ SendBackwardIcon),\n/* harmony export */ \"SendToBackIcon\": () => (/* binding */ SendToBackIcon),\n/* harmony export */ \"SloppinessArchitectIcon\": () => (/* binding */ SloppinessArchitectIcon),\n/* harmony export */ \"SloppinessArtistIcon\": () => (/* binding */ SloppinessArtistIcon),\n/* harmony export */ \"SloppinessCartoonistIcon\": () => (/* binding */ SloppinessCartoonistIcon),\n/* harmony export */ \"StrokeStyleDashedIcon\": () => (/* binding */ StrokeStyleDashedIcon),\n/* harmony export */ \"StrokeStyleDottedIcon\": () => (/* binding */ StrokeStyleDottedIcon),\n/* harmony export */ \"StrokeStyleSolidIcon\": () => (/* binding */ StrokeStyleSolidIcon),\n/* harmony export */ \"StrokeWidthBaseIcon\": () => (/* binding */ StrokeWidthBaseIcon),\n/* harmony export */ \"StrokeWidthBoldIcon\": () => (/* binding */ StrokeWidthBoldIcon),\n/* harmony export */ \"StrokeWidthExtraBoldIcon\": () => (/* binding */ StrokeWidthExtraBoldIcon),\n/* harmony export */ \"StrokeWidthThinIcon\": () => (/* binding */ StrokeWidthThinIcon),\n/* harmony export */ \"SunIcon\": () => (/* binding */ SunIcon),\n/* harmony export */ \"TextAlignBottomIcon\": () => (/* binding */ TextAlignBottomIcon),\n/* harmony export */ \"TextAlignCenterIcon\": () => (/* binding */ TextAlignCenterIcon),\n/* harmony export */ \"TextAlignLeftIcon\": () => (/* binding */ TextAlignLeftIcon),\n/* harmony export */ \"TextAlignMiddleIcon\": () => (/* binding */ TextAlignMiddleIcon),\n/* harmony export */ \"TextAlignRightIcon\": () => (/* binding */ TextAlignRightIcon),\n/* harmony export */ \"TextAlignTopIcon\": () => (/* binding */ TextAlignTopIcon),\n/* harmony export */ \"TextIcon\": () => (/* binding */ TextIcon),\n/* harmony export */ \"TrashIcon\": () => (/* binding */ TrashIcon),\n/* harmony export */ \"TwitterIcon\": () => (/* binding */ TwitterIcon),\n/* harmony export */ \"UndoIcon\": () => (/* binding */ UndoIcon),\n/* harmony export */ \"UngroupIcon\": () => (/* binding */ UngroupIcon),\n/* harmony export */ \"UnlockedIcon\": () => (/* binding */ UnlockedIcon),\n/* harmony export */ \"WelcomeScreenHelpArrow\": () => (/* binding */ WelcomeScreenHelpArrow),\n/* harmony export */ \"WelcomeScreenMenuArrow\": () => (/* binding */ WelcomeScreenMenuArrow),\n/* harmony export */ \"WelcomeScreenTopToolbarArrow\": () => (/* binding */ WelcomeScreenTopToolbarArrow),\n/* harmony export */ \"ZoomInIcon\": () => (/* binding */ ZoomInIcon),\n/* harmony export */ \"ZoomOutIcon\": () => (/* binding */ ZoomOutIcon),\n/* harmony export */ \"alertTriangleIcon\": () => (/* binding */ alertTriangleIcon),\n/* harmony export */ \"back\": () => (/* binding */ back),\n/* harmony export */ \"checkIcon\": () => (/* binding */ checkIcon),\n/* harmony export */ \"clipboard\": () => (/* binding */ clipboard),\n/* harmony export */ \"clone\": () => (/* binding */ clone),\n/* harmony export */ \"copyIcon\": () => (/* binding */ copyIcon),\n/* harmony export */ \"createIcon\": () => (/* binding */ createIcon),\n/* harmony export */ \"done\": () => (/* binding */ done),\n/* harmony export */ \"downloadIcon\": () => (/* binding */ downloadIcon),\n/* harmony export */ \"eraser\": () => (/* binding */ eraser),\n/* harmony export */ \"exportToFileIcon\": () => (/* binding */ exportToFileIcon),\n/* harmony export */ \"extraToolsIcon\": () => (/* binding */ extraToolsIcon),\n/* harmony export */ \"eyeDropperIcon\": () => (/* binding */ eyeDropperIcon),\n/* harmony export */ \"file\": () => (/* binding */ file),\n/* harmony export */ \"frameToolIcon\": () => (/* binding */ frameToolIcon),\n/* harmony export */ \"handIcon\": () => (/* binding */ handIcon),\n/* harmony export */ \"helpIcon\": () => (/* binding */ helpIcon),\n/* harmony export */ \"iconFillColor\": () => (/* binding */ iconFillColor),\n/* harmony export */ \"laserPointerToolIcon\": () => (/* binding */ laserPointerToolIcon),\n/* harmony export */ \"menu\": () => (/* binding */ menu),\n/* harmony export */ \"mermaidLogoIcon\": () => (/* binding */ mermaidLogoIcon),\n/* harmony export */ \"palette\": () => (/* binding */ palette),\n/* harmony export */ \"playerPlayIcon\": () => (/* binding */ playerPlayIcon),\n/* harmony export */ \"playerStopFilledIcon\": () => (/* binding */ playerStopFilledIcon),\n/* harmony export */ \"publishIcon\": () => (/* binding */ publishIcon),\n/* harmony export */ \"questionCircle\": () => (/* binding */ questionCircle),\n/* harmony export */ \"resetZoom\": () => (/* binding */ resetZoom),\n/* harmony export */ \"save\": () => (/* binding */ save),\n/* harmony export */ \"saveAs\": () => (/* binding */ saveAs),\n/* harmony export */ \"share\": () => (/* binding */ share),\n/* harmony export */ \"shareIOS\": () => (/* binding */ shareIOS),\n/* harmony export */ \"shareWindows\": () => (/* binding */ shareWindows),\n/* harmony export */ \"shield\": () => (/* binding */ shield),\n/* harmony export */ \"start\": () => (/* binding */ start),\n/* harmony export */ \"stop\": () => (/* binding */ stop),\n/* harmony export */ \"tablerCheckIcon\": () => (/* binding */ tablerCheckIcon),\n/* harmony export */ \"usersIcon\": () => (/* binding */ usersIcon),\n/* harmony export */ \"zoomIn\": () => (/* binding */ zoomIn),\n/* harmony export */ \"zoomOut\": () => (/* binding */ zoomOut)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var open_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! open-color */ \"../../../node_modules/open-color/open-color.json\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! clsx */ \"../../../node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n //\n// All icons are imported from https://fontawesome.com/icons?d=gallery\n// Icons are under the license https://fontawesome.com/license\n//\n// Note: when adding new icons, review https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/RTL_Guidelines\n// to determine whether or not the icons should be mirrored in right-to-left languages.\n\n\n\n\n\nconst iconFillColor = theme => \"var(--icon-fill-color)\";\n\nconst handlerColor = theme => theme === _constants__WEBPACK_IMPORTED_MODULE_4__.THEME.LIGHT ? open_color__WEBPACK_IMPORTED_MODULE_2__.white : \"#1e1e1e\";\n\nconst createIcon = (d, opts = 512) => {\n const _a = typeof opts === \"number\" ? {\n width: opts\n } : opts,\n {\n width = 512,\n height = width,\n mirror,\n style\n } = _a,\n rest = __rest(_a, [\"width\", \"height\", \"mirror\", \"style\"]);\n\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"svg\", Object.assign({\n \"aria-hidden\": \"true\",\n focusable: \"false\",\n role: \"img\",\n viewBox: `0 0 ${width} ${height}`,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({\n \"rtl-mirror\": mirror\n }),\n style: style\n }, rest, {\n children: typeof d === \"string\" ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"var(--icon-fill-color)\",\n d: d\n }) : d\n }));\n};\nconst tablerIconProps = {\n width: 24,\n height: 24,\n fill: \"none\",\n strokeWidth: 2,\n stroke: \"var(--icon-fill-color)\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\nconst modifiedTablerIconProps = {\n width: 20,\n height: 20,\n fill: \"none\",\n stroke: \"var(--icon-fill-color)\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}; // -----------------------------------------------------------------------------\n// tabler-icons: present\n\nconst PlusPromoIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: 3,\n y: 8,\n width: 18,\n height: 4,\n rx: 1\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: 12,\n y1: 8,\n x2: 12,\n y2: 21\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5\"\n })]\n})), tablerIconProps); // tabler-icons: book\n\nconst LibraryIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"3\",\n y1: \"6\",\n x2: \"3\",\n y2: \"19\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"12\",\n y1: \"6\",\n x2: \"12\",\n y2: \"19\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"21\",\n y1: \"6\",\n x2: \"21\",\n y2: \"19\"\n })]\n})), tablerIconProps); // tabler-icons: plus\n\nconst PlusIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"svg\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"12\",\n y1: \"5\",\n x2: \"12\",\n y2: \"19\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"5\",\n y1: \"12\",\n x2: \"19\",\n y2: \"12\"\n })]\n})), tablerIconProps); // tabler-icons: dots-vertical\n\nconst DotsIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"1\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n cx: \"12\",\n cy: \"19\",\n r: \"1\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n cx: \"12\",\n cy: \"5\",\n r: \"1\"\n })]\n})), tablerIconProps); // tabler-icons: pinned\n\nconst PinIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"svg\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M9 4v6l-2 4v2h10v-2l-2 -4v-6\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"12\",\n y1: \"16\",\n x2: \"12\",\n y2: \"21\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"8\",\n y1: \"4\",\n x2: \"16\",\n y2: \"4\"\n })]\n})), tablerIconProps); // tabler-icons: lock-open (via Figma)\n\nconst UnlockedIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: \"1.25\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: \"1.25\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"mask\", Object.assign({\n id: \"UnlockedIcon\",\n style: {\n maskType: \"alpha\"\n },\n maskUnits: \"userSpaceOnUse\",\n x: 6,\n y: 1,\n width: 9,\n height: 9\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481\",\n fill: \"#fff\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n mask: \"url(#UnlockedIcon)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n\n })\n }))]\n}), modifiedTablerIconProps); // tabler-icons: lock (via Figma)\n\nconst LockedIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916\"\n })]\n})), modifiedTablerIconProps); // custom\n\nconst WelcomeScreenMenuArrow = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: 2,\n strokeLinecap: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })]\n}), {\n width: 41,\n height: 94,\n fill: \"none\"\n}); // custom\n\nconst WelcomeScreenHelpArrow = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: 2,\n strokeLinecap: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })]\n}), {\n width: 85,\n height: 71,\n fill: \"none\"\n}); // custom\n\nconst WelcomeScreenTopToolbarArrow = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: 2,\n strokeLinecap: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: 2,\n strokeLinecap: \"round\"\n })]\n}), {\n width: 38,\n height: 78,\n fill: \"none\"\n}); // custom\n\nconst ExcalLogo = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n fill: \"--icon-fill-color\"\n}, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z\",\n fill: \"--icon-fill-color\"\n })\n})), {\n width: 40,\n height: 40,\n fill: \"none\"\n}); // custom\n\nconst SelectionIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.5 13.5l4.5 4.5\"\n })]\n})), {\n fill: \"none\",\n width: 22,\n height: 22,\n strokeWidth: 1.25\n}); // tabler-icons: square\n\nconst RectangleIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"4\",\n y: \"4\",\n width: \"16\",\n height: \"16\",\n rx: \"2\"\n })]\n})), tablerIconProps); // tabler-icons: square-rotated\n\nconst DiamondIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z\"\n })]\n})), tablerIconProps); // tabler-icons: circle\n\nconst EllipseIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"9\"\n })]\n})), tablerIconProps); // tabler-icons: arrow-narrow-right\n\nconst ArrowIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"5\",\n y1: \"12\",\n x2: \"19\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"15\",\n y1: \"16\",\n x2: \"19\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"15\",\n y1: \"8\",\n x2: \"19\",\n y2: \"12\"\n })]\n})), tablerIconProps); // custom?\n\nconst LineIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.167 10h11.666\",\n strokeWidth: \"1.5\"\n}), modifiedTablerIconProps);\nconst PenModeIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16 7h4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3\"\n })]\n})), tablerIconProps); // modified tabler-icons: pencil\n\nconst FreedrawIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n clipRule: \"evenodd\",\n d: \"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m11.25 5.417 3.333 3.333\"\n })]\n})), modifiedTablerIconProps); // tabler-icons: typography\n\nconst TextIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"20\",\n x2: \"7\",\n y2: \"20\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"14\",\n y1: \"20\",\n x2: \"21\",\n y2: \"20\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"6.9\",\n y1: \"15\",\n x2: \"13.8\",\n y2: \"15\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"10.2\",\n y1: \"6.3\",\n x2: \"16\",\n y2: \"20\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"polyline\", {\n points: \"5 20 11 4 13 4 20 20\"\n })]\n})), tablerIconProps); // modified tabler-icons: photo\n\nconst ImageIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.5 6.667h.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667\"\n })]\n})), modifiedTablerIconProps); // tabler-icons: eraser\n\nconst EraserIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M18 13.3l-6.3 -6.3\"\n })]\n})), tablerIconProps);\nconst ZoomInIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n strokeWidth: \"1.25\",\n d: \"M10 4.167v11.666M4.167 10h11.666\"\n}), modifiedTablerIconProps);\nconst ZoomOutIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 10h10\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst TrashIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n strokeWidth: \"1.25\",\n d: \"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5\"\n}), modifiedTablerIconProps);\nconst EmbedIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"polyline\", {\n points: \"12 16 18 10 12 4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"polyline\", {\n points: \"8 4 2 10 8 16\"\n })]\n})), modifiedTablerIconProps);\nconst DuplicateIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n clipRule: \"evenodd\",\n d: \"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z\"\n })]\n})), modifiedTablerIconProps);\nconst MoonIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n clipRule: \"evenodd\",\n d: \"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n\n}), modifiedTablerIconProps);\nconst SunIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667\"\n })\n})), modifiedTablerIconProps);\nconst HamburgerMenuIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"6\",\n x2: \"20\",\n y2: \"6\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"12\",\n x2: \"20\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"18\",\n x2: \"20\",\n y2: \"18\"\n })]\n})), tablerIconProps);\nconst ExportIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n strokeWidth: \"1.25\",\n d: \"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10\"\n}), modifiedTablerIconProps);\nconst HelpIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"9\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"12\",\n y1: \"17\",\n x2: \"12\",\n y2: \"17.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4\"\n })]\n})), tablerIconProps);\nconst ExternalLinkIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n strokeWidth: \"1.25\",\n d: \"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5\"\n}), modifiedTablerIconProps);\nconst GithubIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst DiscordIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084\"\n })]\n})), modifiedTablerIconProps);\nconst TwitterIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z\"\n })]\n})), tablerIconProps);\nconst checkIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"polyline\", {\n fill: \"none\",\n stroke: \"var(--icon-fill-color)\",\n points: \"20 6 9 17 4 12\"\n}), {\n width: 24,\n height: 24\n});\nconst LinkIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416\"\n })]\n})), modifiedTablerIconProps);\nconst save = createIcon(\"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z\", {\n width: 448,\n height: 512\n});\nconst saveAs = createIcon(\"M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z\", {\n width: 448,\n height: 512\n}); // tabler-icon: folder\n\nconst LoadIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst clipboard = createIcon(\"M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z\", {\n width: 384,\n height: 512\n});\nconst palette = createIcon(\"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z\");\nconst ExportImageIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M15 8h.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M19 16v6\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M22 19l-3 3l-3 -3\"\n })]\n})), tablerIconProps);\nconst exportToFileIcon = createIcon(\"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z\", {\n width: 512,\n height: 512\n});\nconst zoomIn = createIcon(\"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z\", {\n width: 448,\n height: 512\n});\nconst zoomOut = createIcon(\"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z\", {\n width: 448,\n height: 512\n});\nconst done = createIcon(\"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z\");\nconst menu = createIcon(\"M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z\");\nconst UndoIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst RedoIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst questionCircle = createIcon(\"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z\", {\n mirror: true\n});\nconst share = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834\",\n strokeWidth: \"1.5\"\n}), modifiedTablerIconProps);\nconst shareIOS = createIcon(\"M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z\", {\n width: 24,\n height: 24\n});\nconst shareWindows = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"var(--icon-fill-color)\" //zsviczian\n ,\n d: \"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n fill: \"var(--icon-fill-color)\" //zsviczian\n ,\n d: \"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z\"\n })]\n}), {\n width: 64,\n height: 64\n}); // Icon imported form Storybook\n// Storybook is licensed under MIT https://github.com/storybookjs/storybook/blob/next/LICENSE\n\nconst resetZoom = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: \"40\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n ,\n d: \"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z\"\n}), {\n width: 1024\n});\nconst BringForwardIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.889 4.167H8.333c-.767 0-1.389.622-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.767-.622-1.39-1.39-1.39Z\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.5 12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst SendBackwardIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\" //zsviczian\n ,\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M6.944 12.5H12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388\",\n fill: \"var(--icon-fill-color)\" //zsviczian\n\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.889 4.167H8.333c-.767 0-1.389.621-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.768-.622-1.39-1.39-1.39Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst BringToFrontIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M8.775 6.458h2.45a2.316 2.316 0 0 1 2.317 2.316v2.452a2.316 2.316 0 0 1-2.316 2.316H8.774a2.316 2.316 0 0 1-2.317-2.316V8.774a2.316 2.316 0 0 1 2.317-2.316Z\",\n fill: \"var(--icon-fill-color)\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316ZM12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst SendToBackIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"mask\", Object.assign({\n id: \"SendToBackIcon\",\n fill: \"#fff\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z\",\n fill: \"var(--icon-fill-color)\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M9.167 5.833h1.25v-1.25h-1.25v1.25Zm5 5h1.25v-1.25h-1.25v1.25Zm-3.334 3.334h-1.25v1.25h1.25v-1.25Zm-5-5h-1.25v1.25h1.25v-1.25Zm2.084-3.334v2.06h2.5v-2.06h-2.5Zm0 2.06a4.191 4.191 0 0 0 4.19 4.19v-2.5a1.691 1.691 0 0 1-1.69-1.69h-2.5Zm4.19 4.19h2.06v-2.5h-2.06v2.5Zm.81-1.25v.393h2.5v-.393h-2.5Zm0 .393c0 .933-.758 1.69-1.691 1.69v2.5a4.191 4.191 0 0 0 4.19-4.19h-2.5Zm-1.691 1.69h-.393v2.5h.393v-2.5Zm.857 1.25v-2.058h-2.5v2.059h2.5Zm0-2.058a4.191 4.191 0 0 0-4.19-4.191v2.5c.933 0 1.69.757 1.69 1.69h2.5Zm-4.19-4.191h-2.06v2.5h2.06v-2.5Zm-.81 1.25v-.393h-2.5v.393h2.5Zm0-.393c0-.934.758-1.69 1.692-1.69v-2.5a4.191 4.191 0 0 0-4.192 4.19h2.5Zm1.692-1.69h.392v-2.5h-.392v2.5Z\",\n fill: \"var(--icon-fill-color)\",\n mask: \"url(#SendToBackIcon)\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps); //\n// Align action icons created from scratch to match those of z-index actions\n// Note: vertical align icons are flipped so the larger item is always the\n// first one the user sees. Horizontal align icons should not be flipped since\n// that would make them lie about their function.\n//\n\nconst AlignTopIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.333 3.333h13.334\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst AlignBottomIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.333 16.667h13.334\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst AlignLeftIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.333 3.333v13.334\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst AlignRightIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.667 3.333v13.334\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst DistributeHorizontallyIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.667 3.333v13.334M3.333 3.333v13.334\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst DistributeVerticallyIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.333 3.333h13.334M3.333 16.667h13.334\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z\"\n })]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst CenterVerticallyIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M1.667 10h2.916\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M8.333 10h3.334\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M15.417 10h2.916\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z\"\n })]\n})), modifiedTablerIconProps);\nconst CenterHorizontallyIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 18.333v-2.916\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 11.667V8.333\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 4.583V1.667\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z\"\n })]\n})), modifiedTablerIconProps);\nconst usersIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n cx: \"9\",\n cy: \"7\",\n r: \"4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16 3.13a4 4 0 0 1 0 7.75\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M21 21v-2a4 4 0 0 0 -3 -3.85\"\n })]\n})), tablerIconProps); // not mirrored because it's inspired by a playback control, which is always RTL\n\nconst start = createIcon(\"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z\");\nconst stop = createIcon(\"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z\");\nconst CloseIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M15 5 5 15M5 5l10 10\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst back = createIcon(\"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z\", {\n width: 320,\n height: 512,\n style: {\n marginLeft: \"-0.2rem\"\n },\n mirror: true\n});\nconst clone = createIcon(\"M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z\", {\n mirror: true\n}); // modified https://feathericons.com/?query=shield\n\nconst shield = createIcon(\"M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z\", {\n width: 24\n});\nconst file = createIcon(\"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z\", {\n width: 384,\n height: 512\n}); // TODO barnabasmolnar/editor-redesign\n// couldn't find a new icon for this\n\nconst GroupIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n theme\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M25 26H111V111H25\",\n fill: iconFillColor(theme)\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z\",\n stroke: iconFillColor(theme),\n strokeWidth: \"2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M100 100H160V160H100\",\n fill: iconFillColor(theme)\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z\",\n stroke: iconFillColor(theme),\n strokeWidth: \"2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n fill: handlerColor(theme),\n stroke: iconFillColor(theme),\n strokeWidth: \"6\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"2.5\",\n y: \"2.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"2.5\",\n y: \"149.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"147.5\",\n y: \"149.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"147.5\",\n y: \"2.5\",\n width: \"30\",\n height: \"30\"\n })]\n }))]\n}), {\n width: 182,\n height: 182,\n mirror: true\n}));\nconst UngroupIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n theme\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M25 26H111V111H25\",\n fill: iconFillColor(theme)\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z\",\n stroke: iconFillColor(theme),\n strokeWidth: \"2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M100 100H160V160H100\",\n fill: iconFillColor(theme)\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z\",\n stroke: iconFillColor(theme),\n strokeWidth: \"2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n fill: handlerColor(theme),\n stroke: iconFillColor(theme),\n strokeWidth: \"6\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"2.5\",\n y: \"2.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"78.5\",\n y: \"149.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"147.5\",\n y: \"149.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"147.5\",\n y: \"78.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"105.5\",\n y: \"2.5\",\n width: \"30\",\n height: \"30\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"2.5\",\n y: \"102.5\",\n width: \"30\",\n height: \"30\"\n })]\n }))]\n}), {\n width: 182,\n height: 182,\n mirror: true\n}));\nconst FillZigZagIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n strokeWidth: 1.25\n}, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793\"\n })\n})), modifiedTablerIconProps);\nconst FillHachureIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"mask\", Object.assign({\n id: \"FillHachureIcon\",\n style: {\n maskType: \"alpha\"\n },\n maskUnits: \"userSpaceOnUse\",\n x: 2,\n y: 2,\n width: 16,\n height: 16\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z\",\n fill: \"var(--icon-fill-color)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n mask: \"url(#FillHachureIcon)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n }))]\n}), modifiedTablerIconProps);\nconst FillCrossHatchIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n clipPath: \"url(#a)\"\n }, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"mask\", Object.assign({\n id: \"FillCrossHatchIcon\",\n style: {\n maskType: \"alpha\"\n },\n maskUnits: \"userSpaceOnUse\",\n x: -1,\n y: -1,\n width: 22,\n height: 22\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n mask: \"url(#FillCrossHatchIcon)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z\",\n fill: \"var(--icon-fill-color)\"\n })\n }))]\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst FillSolidIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n clipPath: \"url(#a)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), Object.assign(Object.assign({}, modifiedTablerIconProps), {\n fill: \"var(--icon-fill-color)\"\n}));\nconst StrokeWidthThinIcon = createIcon( //zsviczian\n(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.167 10h11.666\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"0.75\" //zsviczian\n ,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n}), modifiedTablerIconProps);\nconst StrokeWidthBaseIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.167 10h11.666\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"2.25\" //zsviczian\n ,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n}), modifiedTablerIconProps);\nconst StrokeWidthBoldIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 10h10\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"3.5\" //zsviczian\n ,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), modifiedTablerIconProps);\nconst StrokeWidthExtraBoldIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 10h10\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"5.75\" //zsviczian\n ,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}), modifiedTablerIconProps);\nconst StrokeStyleSolidIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n theme\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6 10H34\",\n stroke: iconFillColor(theme),\n strokeWidth: 2,\n fill: \"none\",\n strokeLinecap: \"round\"\n}), {\n width: 40,\n height: 20\n}));\nconst StrokeStyleDashedIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"2\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 12h2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M17 12h2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M11 12h2\"\n })]\n})), tablerIconProps); // tabler-icons: line-dotted\n\nconst StrokeStyleDottedIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"2\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 12v.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M8 12v.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 12v.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16 12v.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M20 12v.01\"\n })]\n})), tablerIconProps);\nconst SloppinessArchitectIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst SloppinessArtistIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst SloppinessCartoonistIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42\",\n strokeWidth: \"1.25\"\n}), modifiedTablerIconProps);\nconst EdgeSharpIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"svg\", Object.assign({\n strokeWidth: \"1.5\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.3333 3.33331V3.34331\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.6667 3.33331V3.34331\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.6667 6.66669V6.67669\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.6667 10V10.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.33334 13.3333V13.3433\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.6667 13.3333V13.3433\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M3.33334 16.6667V16.6767\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6.66666 16.6667V16.6767\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10 16.6667V16.6767\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M13.3333 16.6667V16.6767\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16.6667 16.6667V16.6767\"\n })]\n})), modifiedTablerIconProps); // tabler-icons: border-radius\n\nconst EdgeRoundIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\",\n stroke: \"var(--icon-fill-color)\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 12v-4a4 4 0 0 1 4 -4h4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"16\",\n y1: \"4\",\n x2: \"16\",\n y2: \"4.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"20\",\n y1: \"4\",\n x2: \"20\",\n y2: \"4.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"20\",\n y1: \"8\",\n x2: \"20\",\n y2: \"8.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"20\",\n y1: \"12\",\n x2: \"20\",\n y2: \"12.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"16\",\n x2: \"4\",\n y2: \"16.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"20\",\n y1: \"16\",\n x2: \"20\",\n y2: \"16.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"20\",\n x2: \"4\",\n y2: \"20.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"8\",\n y1: \"20\",\n x2: \"8\",\n y2: \"20.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"12\",\n y1: \"20\",\n x2: \"12\",\n y2: \"20.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"16\",\n y1: \"20\",\n x2: \"16\",\n y2: \"20.01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"20\",\n y1: \"20\",\n x2: \"20\",\n y2: \"20.01\"\n })]\n})), tablerIconProps);\nconst ArrowheadNoneIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M6 10H34\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: 2,\n fill: \"none\"\n}), {\n width: 40,\n height: 20\n});\nconst ArrowheadArrowIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n flip = false\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n transform: flip ? \"translate(40, 0) scale(-1, 1)\" : \"\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: 2,\n fill: \"none\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M34 10H6M34 10L27 5M34 10L27 15\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M27.5 5L34.5 10L27.5 15\"\n })]\n})), {\n width: 40,\n height: 20\n}));\nconst ArrowheadDotIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n flip = false\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n fill: \"var(--icon-fill-color)\",\n transform: flip ? \"translate(40, 0) scale(-1, 1)\" : \"\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M32 10L6 10\",\n strokeWidth: 2\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"circle\", {\n r: \"4\",\n transform: \"matrix(-1 0 0 1 30 10)\"\n })]\n})), {\n width: 40,\n height: 20\n}));\nconst ArrowheadBarIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n flip = false\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n transform: flip ? \"translate(40, 0) scale(-1, 1)\" : \"\"\n}, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M34 10H5.99996M34 10L34 5M34 10L34 15\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: 2,\n fill: \"none\"\n })\n})), {\n width: 40,\n height: 20\n}));\nconst ArrowheadTriangleIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n flip = false\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n fill: \"var(--icon-fill-color)\",\n transform: flip ? \"translate(40, 0) scale(-1, 1)\" : \"\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M32 10L6 10\",\n strokeWidth: 2\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5\"\n })]\n})), {\n width: 40,\n height: 20\n}));\nconst FontSizeSmallIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n clipPath: \"url(#a)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst FontSizeMediumIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n clipPath: \"url(#a)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 16.667V3.333L10 15l5-11.667v13.334\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst FontSizeLargeIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n clipPath: \"url(#a)\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.833 3.333v13.334h8.334\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst FontSizeExtraLargeIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n}), modifiedTablerIconProps);\nconst FontFamilyNormalIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334\"\n })\n }))\n}), modifiedTablerIconProps);\nconst FontFamilyCodeIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n clipPath: \"url(#a)\",\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667\"\n })\n })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"defs\", {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"clipPath\", Object.assign({\n id: \"a\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"#fff\",\n d: \"M0 0h20v20H0z\"\n })\n }))\n })]\n}), modifiedTablerIconProps);\nconst FontFamilyLocalFontIcon = createIcon( //zsviczian\n(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m 151.43258,8.7863685 q -7.87381,6.7489805 -14.62279,12.3731315 0,11.248301 0,23.621433 8.99864,35.994564 13.49796,76.488447 -4.49932,7.87381 -11.2483,13.49796 -16.87245,1.12483 -29.24559,-3.37449 -6.74898,-4.49932 -10.123467,-11.2483 -7.87381,-2.24966 -15.747621,0 -6.748981,1.12483 -11.248302,5.62415 l -16.872451,16.87245 q -11.248302,2.24966 -19.122113,8.99864 -6.74898,6.74899 -6.74898,17.99729 2.24966,3.37449 4.49932,7.87381 2.24966,4.49932 2.24966,12.37313 -16.872452,31.49524 -30.3704131,65.24015 -2.2496602,23.62143 0,47.24286 6.7489811,10.12347 15.7476221,20.24694 10.123471,4.49932 20.246942,13.49797 25.871093,4.49932 53.991846,8.99864 23.621437,-5.62415 50.617357,-5.62415 3.37449,2.24966 6.74898,5.62415 0,25.87109 0,55.11667 1.12483,19.12211 5.62415,38.24423 v 61.86565 q 2.24966,5.62415 8.99864,8.99864 10.12347,0 19.12211,-3.37449 3.37449,2.24966 10.12347,2.24966 7.87382,-13.49796 17.99729,-24.74626 5.62415,-34.86973 7.87381,-70.8643 -5.62415,-40.49388 -5.62415,-82.1126 l 7.87381,-7.87381 h 16.87245 q 21.37177,-8.99864 44.9932,-13.49796 14.6228,-7.87381 30.37042,-15.74762 3.37449,-1.12483 8.99864,-1.12483 11.2483,-10.12347 23.62143,-22.4966 2.24966,-6.74898 6.74898,-12.37313 V 230.3779 q 4.49932,-14.62279 6.74898,-30.37041 4.49932,-11.2483 10.12347,-20.24694 2.24966,-17.99728 2.24966,-37.1194 -5.62415,-7.87381 -7.87381,-15.74762 -6.74898,-6.74898 -13.49796,-13.49796 -11.2483,-6.74898 -20.24694,-10.12347 -46.11804,-4.499321 -92.23607,0 -10.12347,4.49932 -22.4966,4.49932 -6.74898,-2.24966 -10.12347,-7.873811 2.24966,-23.621433 2.24966,-46.118035 -5.62415,-8.998641 -4.49932,-19.122113 Q 203.17477,22.28433 195.30095,13.285689 187.42714,3.1622179 178.4285,2.0373877 164.93054,5.4118781 151.43258,8.7863685 Z M 136.80979,175.26123 q 7.87381,2.24966 11.2483,12.37313 -1.12483,39.36905 1.12483,80.98777 4.49932,6.74898 3.37449,15.74762 -5.62415,6.74898 -12.37313,11.2483 -17.99728,1.12483 -33.74491,5.62415 -19.122108,0 -37.11939,-1.12483 -6.748981,-4.49932 -11.248301,-7.87381 -1.12483,-14.62279 1.12483,-29.24558 16.872452,-30.37042 28.120753,-62.99049 4.499321,-7.87381 11.248301,-13.49796 14.622787,-3.37449 29.245587,-5.62415 4.49932,-3.37449 8.99864,-5.62415 z M 283.0377,146.01564 q 8.99865,-1.12483 17.99729,2.24966 4.49932,2.24966 8.99864,7.87382 2.24966,8.99864 1.12483,20.24694 -6.74898,11.2483 -10.12347,22.4966 -4.49932,25.87109 -10.12348,52.86702 -24.74626,11.2483 -47.24286,24.74626 -10.12347,2.24966 -19.12211,4.49932 l -10.12347,-10.12347 q 0,-44.99321 3.37449,-84.36226 -3.37449,-13.49796 -6.74898,-23.62143 4.49932,-6.74898 12.37313,-11.24831 29.24558,-3.37449 59.61599,-5.62415 z M 638.74,93.24 766.76,221.26 488.77,499.25 374.63,511.85 c -15.28,1.69 -28.19,-11.23 -26.49,-26.51 l 12.7,-114.22 z M 845.94,74.18 785.83,14.07 c -18.75,-18.75 -49.16,-18.75 -67.91,0 l -56.55,56.55 128.02,128.02 56.55,-56.55 c 18.75,-18.76 18.75,-49.16 0,-67.91 z\"\n })\n }))\n}));\nconst TextAlignLeftIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"8\",\n x2: \"20\",\n y2: \"8\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"12\",\n x2: \"12\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"16\",\n x2: \"16\",\n y2: \"16\"\n })]\n})), tablerIconProps);\nconst TextAlignCenterIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"8\",\n x2: \"20\",\n y2: \"8\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"8\",\n y1: \"12\",\n x2: \"16\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"6\",\n y1: \"16\",\n x2: \"18\",\n y2: \"16\"\n })]\n})), tablerIconProps);\nconst TextAlignRightIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n stroke: \"var(--icon-fill-color)\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"8\",\n x2: \"20\",\n y2: \"8\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"10\",\n y1: \"12\",\n x2: \"20\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"8\",\n y1: \"16\",\n x2: \"20\",\n y2: \"16\"\n })]\n})), tablerIconProps); // tabler-icons: layout-align-top\n\nconst TextAlignTopIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n theme\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\",\n stroke: \"var(--icon-fill-color)\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"4\",\n x2: \"20\",\n y2: \"4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"9\",\n y: \"8\",\n width: \"6\",\n height: \"12\",\n rx: \"2\"\n })]\n})), tablerIconProps)); // tabler-icons: layout-align-bottom\n\nconst TextAlignBottomIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n theme\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"2\",\n stroke: \"var(--icon-fill-color)\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"20\",\n x2: \"20\",\n y2: \"20\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"9\",\n y: \"4\",\n width: \"6\",\n height: \"12\",\n rx: \"2\"\n })]\n})), tablerIconProps)); // tabler-icons: layout-align-middle\n\nconst TextAlignMiddleIcon = react__WEBPACK_IMPORTED_MODULE_1___default().memo(({\n theme\n}) => createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: \"1.5\",\n stroke: \"var(--icon-fill-color)\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"4\",\n y1: \"12\",\n x2: \"9\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"line\", {\n x1: \"15\",\n y1: \"12\",\n x2: \"20\",\n y2: \"12\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"rect\", {\n x: \"9\",\n y: \"6\",\n width: \"6\",\n height: \"12\",\n rx: \"2\"\n })]\n})), tablerIconProps));\nconst publishIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z\",\n fill: \"var(--icon-fill-color)\"\n}), {\n width: 640,\n height: 512\n});\nconst eraser = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z\"\n}));\nconst handIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: 1.25\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M14 5.5a1.5 1.5 0 0 1 3 0v6.5\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47\"\n })]\n})), tablerIconProps);\nconst downloadIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7 11l5 5l5 -5\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 4l0 12\"\n })]\n}), tablerIconProps);\nconst copyIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2\"\n })]\n}), tablerIconProps);\nconst helpIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 17l0 .01\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4\"\n })]\n}), tablerIconProps);\nconst playerPlayIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7 4v16l13 -8z\"\n })]\n}), tablerIconProps);\nconst playerStopFilledIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z\",\n strokeWidth: \"0\",\n fill: \"--icon-fill-color\"\n })]\n}), tablerIconProps);\nconst tablerCheckIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M5 12l5 5l10 -10\"\n })]\n}), tablerIconProps);\nconst alertTriangleIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 9v4\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 17h.01\"\n })]\n}), tablerIconProps);\nconst eyeDropperIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: 1.25\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M11 7l6 6\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z\"\n })]\n})), tablerIconProps);\nconst extraToolsIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: 1.5\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12 3l-4 7h8z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z\"\n })]\n})), tablerIconProps);\nconst frameToolIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n strokeWidth: 1.5\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n stroke: \"none\",\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 7l16 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4 17l16 0\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M7 4l0 16\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M17 4l0 16\"\n })]\n})), tablerIconProps);\nconst mermaidLogoIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n fill: \"black\",\n d: \"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z\"\n}));\nconst ArrowRightIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M4.16602 10H15.8327\",\n stroke: \"white\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.5 13.3333L15.8333 10\",\n stroke: \"white\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"M12.5 6.66666L15.8333 9.99999\",\n stroke: \"white\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })]\n}), {\n width: 20,\n height: 20\n});\nconst laserPointerToolIcon = createIcon((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"g\", Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: \"1.25\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n transform: \"rotate(90 10 10)\"\n}, {\n children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n clipRule: \"evenodd\",\n d: \"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z\"\n }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", {\n d: \"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13\"\n })]\n})), 20);\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/icons.tsx?");
3308
3363
 
3309
3364
  /***/ }),
3310
3365
 
@@ -3513,7 +3568,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
3513
3568
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3514
3569
 
3515
3570
  "use strict";
3516
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AllowedExcalidrawActiveTools\": () => (/* binding */ AllowedExcalidrawActiveTools),\n/* harmony export */ \"restore\": () => (/* binding */ restore),\n/* harmony export */ \"restoreAppState\": () => (/* binding */ restoreAppState),\n/* harmony export */ \"restoreElements\": () => (/* binding */ restoreElements),\n/* harmony export */ \"restoreLibraryItems\": () => (/* binding */ restoreLibraryItems)\n/* harmony export */ });\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _element_typeChecks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../element/typeChecks */ \"../../element/typeChecks.ts\");\n/* harmony import */ var _random__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../random */ \"../../random.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\n/* harmony import */ var _appState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../appState */ \"../../appState.ts\");\n/* harmony import */ var _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../element/linearElementEditor */ \"../../element/linearElementEditor.ts\");\n/* harmony import */ var _element_mutateElement__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../element/mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _element_textElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../element/textElement */ \"../../element/textElement.ts\");\n/* harmony import */ var _url__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./url */ \"../../data/url.ts\");\n\n\n\n\n\n\n\n\n\n\n\nconst AllowedExcalidrawActiveTools = {\n selection: true,\n text: true,\n rectangle: true,\n diamond: true,\n ellipse: true,\n line: true,\n image: true,\n arrow: true,\n freedraw: true,\n eraser: false,\n custom: true,\n frame: true,\n embeddable: true,\n hand: true,\n mermaid: true\n};\n\nconst getFontFamilyByName = fontFamilyName => {\n if (Object.keys(_constants__WEBPACK_IMPORTED_MODULE_3__.FONT_FAMILY).includes(fontFamilyName)) {\n return _constants__WEBPACK_IMPORTED_MODULE_3__.FONT_FAMILY[fontFamilyName];\n }\n\n return _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_FONT_FAMILY;\n};\n\nconst repairBinding = binding => {\n if (!binding) {\n return null;\n }\n\n return Object.assign(Object.assign({}, binding), {\n focus: binding.focus || 0\n });\n};\n\nconst restoreElementWithProperties = (element, extra) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\n\n const base = {\n type: extra.type || element.type,\n // all elements must have version > 0 so getSceneVersion() will pick up\n // newly added elements\n version: element.version || 1,\n versionNonce: (_a = element.versionNonce) !== null && _a !== void 0 ? _a : 0,\n isDeleted: (_b = element.isDeleted) !== null && _b !== void 0 ? _b : false,\n id: element.id || (0,_random__WEBPACK_IMPORTED_MODULE_2__.randomId)(),\n fillStyle: element.fillStyle || _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.fillStyle,\n strokeWidth: element.strokeWidth || _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.strokeWidth,\n strokeStyle: (_c = element.strokeStyle) !== null && _c !== void 0 ? _c : _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.strokeStyle,\n roughness: (_d = element.roughness) !== null && _d !== void 0 ? _d : _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.roughness,\n opacity: element.opacity == null ? _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.opacity : element.opacity,\n angle: element.angle || 0,\n x: (_f = (_e = extra.x) !== null && _e !== void 0 ? _e : element.x) !== null && _f !== void 0 ? _f : 0,\n y: (_h = (_g = extra.y) !== null && _g !== void 0 ? _g : element.y) !== null && _h !== void 0 ? _h : 0,\n strokeColor: element.strokeColor || _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.strokeColor,\n backgroundColor: element.backgroundColor || _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.backgroundColor,\n width: element.width || 0,\n height: element.height || 0,\n seed: (_j = element.seed) !== null && _j !== void 0 ? _j : 1,\n groupIds: (_k = element.groupIds) !== null && _k !== void 0 ? _k : [],\n frameId: (_l = element.frameId) !== null && _l !== void 0 ? _l : null,\n roundness: element.roundness ? element.roundness : element.strokeSharpness === \"round\" ? {\n // for old elements that would now use adaptive radius algo,\n // use legacy algo instead\n type: (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_1__.isUsingAdaptiveRadius)(element.type) ? _constants__WEBPACK_IMPORTED_MODULE_3__.ROUNDNESS.LEGACY : _constants__WEBPACK_IMPORTED_MODULE_3__.ROUNDNESS.PROPORTIONAL_RADIUS\n } : null,\n boundElements: element.boundElementIds ? element.boundElementIds.map(id => ({\n type: \"arrow\",\n id\n })) : (_m = element.boundElements) !== null && _m !== void 0 ? _m : [],\n updated: (_o = element.updated) !== null && _o !== void 0 ? _o : (0,_utils__WEBPACK_IMPORTED_MODULE_7__.getUpdatedTimestamp)(),\n link: element.link ? (0,_url__WEBPACK_IMPORTED_MODULE_9__.normalizeLink)(element.link) : null,\n locked: (_p = element.locked) !== null && _p !== void 0 ? _p : false\n };\n\n if (\"customData\" in element) {\n base.customData = element.customData;\n }\n\n if (_constants__WEBPACK_IMPORTED_MODULE_3__.PRECEDING_ELEMENT_KEY in element) {\n base[_constants__WEBPACK_IMPORTED_MODULE_3__.PRECEDING_ELEMENT_KEY] = element[_constants__WEBPACK_IMPORTED_MODULE_3__.PRECEDING_ELEMENT_KEY];\n }\n\n return Object.assign(Object.assign(Object.assign({}, base), (0,_element__WEBPACK_IMPORTED_MODULE_0__.getNormalizedDimensions)(base)), extra);\n};\n\nconst restoreElement = (element, refreshDimensions = false) => {\n var _a, _b, _c, _d;\n\n switch (element.type) {\n case \"text\":\n let fontSize = element.fontSize;\n let fontFamily = element.fontFamily;\n\n if (\"font\" in element) {\n const [fontPx, _fontFamily] = element.font.split(\" \");\n fontSize = parseFloat(fontPx);\n fontFamily = getFontFamilyByName(_fontFamily);\n }\n\n const text = (_a = element.text) !== null && _a !== void 0 ? _a : \"\"; // line-height might not be specified either when creating elements\n // programmatically, or when importing old diagrams.\n // For the latter we want to detect the original line height which\n // will likely differ from our per-font fixed line height we now use,\n // to maintain backward compatibility.\n\n const lineHeight = element.lineHeight || (element.height ? // detect line-height from current element height and font-size\n (0,_element_textElement__WEBPACK_IMPORTED_MODULE_8__.detectLineHeight)(element) : // no element height likely means programmatic use, so default\n // to a fixed line height\n (0,_element_textElement__WEBPACK_IMPORTED_MODULE_8__.getDefaultLineHeight)(element.fontFamily));\n const baseline = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_8__.measureBaseline)(element.text, (0,_utils__WEBPACK_IMPORTED_MODULE_7__.getFontString)(element), lineHeight);\n element = restoreElementWithProperties(element, {\n fontSize,\n fontFamily,\n text,\n rawText: (_b = element.rawText) !== null && _b !== void 0 ? _b : \"\",\n textAlign: element.textAlign || _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_TEXT_ALIGN,\n verticalAlign: element.verticalAlign || _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_VERTICAL_ALIGN,\n containerId: (_c = element.containerId) !== null && _c !== void 0 ? _c : null,\n originalText: element.originalText || text,\n lineHeight,\n baseline\n });\n\n if (refreshDimensions) {\n element = Object.assign(Object.assign({}, element), (0,_element__WEBPACK_IMPORTED_MODULE_0__.refreshTextDimensions)(element));\n }\n\n return element;\n\n case \"freedraw\":\n {\n return restoreElementWithProperties(element, {\n points: element.points,\n lastCommittedPoint: null,\n simulatePressure: element.simulatePressure,\n pressures: element.pressures\n });\n }\n\n case \"image\":\n return restoreElementWithProperties(element, {\n status: element.status || \"pending\",\n fileId: element.fileId,\n scale: element.scale || [1, 1]\n });\n\n case \"line\": // @ts-ignore LEGACY type\n // eslint-disable-next-line no-fallthrough\n\n case \"draw\":\n case \"arrow\":\n {\n const {\n startArrowhead = null,\n endArrowhead = element.type === \"arrow\" ? \"arrow\" : null\n } = element;\n let x = element.x;\n let y = element.y;\n let points = // migrate old arrow model to new one\n !Array.isArray(element.points) || element.points.length < 2 ? [[0, 0], [element.width, element.height]] : element.points;\n\n if (points[0][0] !== 0 || points[0][1] !== 0) {\n ({\n points,\n x,\n y\n } = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_5__.LinearElementEditor.getNormalizedPoints(element));\n }\n\n return restoreElementWithProperties(element, {\n type: element.type === \"draw\" ? \"line\" : element.type,\n startBinding: repairBinding(element.startBinding),\n endBinding: repairBinding(element.endBinding),\n lastCommittedPoint: null,\n startArrowhead,\n endArrowhead,\n points,\n x,\n y\n });\n }\n // generic elements\n\n case \"ellipse\":\n return restoreElementWithProperties(element, {});\n\n case \"rectangle\":\n return restoreElementWithProperties(element, {});\n\n case \"diamond\":\n return restoreElementWithProperties(element, {});\n\n case \"embeddable\":\n return restoreElementWithProperties(element, {\n validated: null\n });\n\n case \"frame\":\n return restoreElementWithProperties(element, {\n name: (_d = element.name) !== null && _d !== void 0 ? _d : null\n });\n // Don't use default case so as to catch a missing an element type case.\n // We also don't want to throw, but instead return void so we filter\n // out these unsupported elements from the restored array.\n }\n};\n/**\r\n * Repairs contaienr element's boundElements array by removing duplicates and\r\n * fixing containerId of bound elements if not present. Also removes any\r\n * bound elements that do not exist in the elements array.\r\n *\r\n * NOTE mutates elements.\r\n */\n\n\nconst repairContainerElement = (container, elementsMap) => {\n if (container.boundElements) {\n // copy because we're not cloning on restore, and we don't want to mutate upstream\n const boundElements = container.boundElements.slice(); // dedupe bindings & fix boundElement.containerId if not set already\n\n const boundIds = new Set();\n container.boundElements = boundElements.reduce((acc, binding) => {\n const boundElement = elementsMap.get(binding.id);\n\n if (boundElement && !boundIds.has(binding.id)) {\n boundIds.add(binding.id);\n\n if (boundElement.isDeleted) {\n return acc;\n }\n\n acc.push(binding);\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_1__.isTextElement)(boundElement) && // being slightly conservative here, preserving existing containerId\n // if defined, lest boundElements is stale\n !boundElement.containerId) {\n boundElement.containerId = container.id;\n }\n }\n\n return acc;\n }, []);\n }\n};\n/**\r\n * Repairs target bound element's container's boundElements array,\r\n * or removes contaienrId if container does not exist.\r\n *\r\n * NOTE mutates elements.\r\n */\n\n\nconst repairBoundElement = (boundElement, elementsMap) => {\n const container = boundElement.containerId ? elementsMap.get(boundElement.containerId) : null;\n\n if (!container) {\n boundElement.containerId = null;\n return;\n }\n\n if (boundElement.isDeleted) {\n return;\n }\n\n if (container.boundElements && !container.boundElements.find(binding => binding.id === boundElement.id)) {\n // copy because we're not cloning on restore, and we don't want to mutate upstream\n const boundElements = (container.boundElements || (container.boundElements = [])).slice();\n boundElements.push({\n type: \"text\",\n id: boundElement.id\n });\n container.boundElements = boundElements;\n }\n};\n/**\r\n * Remove an element's frameId if its containing frame is non-existent\r\n *\r\n * NOTE mutates elements.\r\n */\n\n\nconst repairFrameMembership = (element, elementsMap) => {\n if (element.frameId) {\n const containingFrame = elementsMap.get(element.frameId);\n\n if (!containingFrame) {\n element.frameId = null;\n }\n }\n};\n\nconst restoreElements = (elements,\n/** NOTE doesn't serve for reconciliation */\nlocalElements, opts) => {\n // used to detect duplicate top-level element ids\n const existingIds = new Set();\n const localElementsMap = localElements ? (0,_utils__WEBPACK_IMPORTED_MODULE_7__.arrayToMap)(localElements) : null;\n const restoredElements = (elements || []).reduce((elements, element) => {\n // filtering out selection, which is legacy, no longer kept in elements,\n // and causing issues if retained\n if (element.type !== \"selection\" && !(0,_element__WEBPACK_IMPORTED_MODULE_0__.isInvisiblySmallElement)(element)) {\n let migratedElement = restoreElement(element, opts === null || opts === void 0 ? void 0 : opts.refreshDimensions);\n\n if (migratedElement) {\n const localElement = localElementsMap === null || localElementsMap === void 0 ? void 0 : localElementsMap.get(element.id);\n\n if (localElement && localElement.version > migratedElement.version) {\n migratedElement = (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_6__.bumpVersion)(migratedElement, localElement.version);\n }\n\n if (existingIds.has(migratedElement.id)) {\n migratedElement = Object.assign(Object.assign({}, migratedElement), {\n id: (0,_random__WEBPACK_IMPORTED_MODULE_2__.randomId)()\n });\n }\n\n existingIds.add(migratedElement.id);\n elements.push(migratedElement);\n }\n }\n\n return elements;\n }, []);\n\n if (!(opts === null || opts === void 0 ? void 0 : opts.repairBindings)) {\n return restoredElements;\n } // repair binding. Mutates elements.\n\n\n const restoredElementsMap = (0,_utils__WEBPACK_IMPORTED_MODULE_7__.arrayToMap)(restoredElements);\n\n for (const element of restoredElements) {\n if (element.frameId) {\n repairFrameMembership(element, restoredElementsMap);\n }\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_1__.isTextElement)(element) && element.containerId) {\n repairBoundElement(element, restoredElementsMap);\n } else if (element.boundElements) {\n repairContainerElement(element, restoredElementsMap);\n }\n }\n\n return restoredElements;\n};\n\nconst coalesceAppStateValue = (key, appState, defaultAppState) => {\n const value = appState[key]; // NOTE the value! assertion is needed in TS 4.5.5 (fixed in newer versions)\n\n return value !== undefined ? value : defaultAppState[key];\n};\n\nconst LegacyAppStateMigrations = {\n isSidebarDocked: (appState, defaultAppState) => {\n var _a;\n\n return [\"defaultSidebarDockedPreference\", (_a = appState.isSidebarDocked) !== null && _a !== void 0 ? _a : coalesceAppStateValue(\"defaultSidebarDockedPreference\", appState, defaultAppState)];\n }\n};\nconst restoreAppState = (appState, localAppState) => {\n var _a, _b, _c, _d;\n\n appState = appState || {};\n const defaultAppState = (0,_appState__WEBPACK_IMPORTED_MODULE_4__.getDefaultAppState)();\n const nextAppState = {}; // first, migrate all legacy AppState properties to new ones. We do it\n // in one go before migrate the rest of the properties in case the new ones\n // depend on checking any other key (i.e. they are coupled)\n\n for (const legacyKey of Object.keys(LegacyAppStateMigrations)) {\n if (legacyKey in appState) {\n const [nextKey, nextValue] = LegacyAppStateMigrations[legacyKey](appState, defaultAppState);\n nextAppState[nextKey] = nextValue;\n }\n }\n\n for (const [key, defaultValue] of Object.entries(defaultAppState)) {\n // if AppState contains a legacy key, prefer that one and migrate its\n // value to the new one\n const suppliedValue = appState[key];\n const localValue = localAppState ? localAppState[key] : undefined;\n nextAppState[key] = suppliedValue !== undefined ? suppliedValue : localValue !== undefined ? localValue : defaultValue;\n }\n\n return Object.assign(Object.assign({}, nextAppState), {\n cursorButton: (localAppState === null || localAppState === void 0 ? void 0 : localAppState.cursorButton) || \"up\",\n // reset on fresh restore so as to hide the UI button if penMode not active\n penDetected: (_a = localAppState === null || localAppState === void 0 ? void 0 : localAppState.penDetected) !== null && _a !== void 0 ? _a : appState.penMode ? (_b = appState.penDetected) !== null && _b !== void 0 ? _b : false : false,\n activeTool: Object.assign(Object.assign({}, (0,_utils__WEBPACK_IMPORTED_MODULE_7__.updateActiveTool)(defaultAppState, nextAppState.activeTool.type && AllowedExcalidrawActiveTools[nextAppState.activeTool.type] ? nextAppState.activeTool : {\n type: \"selection\"\n })), {\n lastActiveTool: null,\n locked: (_c = nextAppState.activeTool.locked) !== null && _c !== void 0 ? _c : false\n }),\n // Migrates from previous version where appState.zoom was a number\n zoom: typeof appState.zoom === \"number\" ? {\n value: appState.zoom\n } : ((_d = appState.zoom) === null || _d === void 0 ? void 0 : _d.value) ? appState.zoom : defaultAppState.zoom,\n openSidebar: // string (legacy)\n typeof appState.openSidebar === \"string\" ? {\n name: _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_SIDEBAR.name\n } : nextAppState.openSidebar\n });\n};\nconst restore = (data,\n/**\r\n * Local AppState (`this.state` or initial state from localStorage) so that we\r\n * don't overwrite local state with default values (when values not\r\n * explicitly specified).\r\n * Supply `null` if you can't get access to it.\r\n */\nlocalAppState, localElements, elementsConfig) => {\n return {\n elements: restoreElements(data === null || data === void 0 ? void 0 : data.elements, localElements, elementsConfig),\n appState: restoreAppState(data === null || data === void 0 ? void 0 : data.appState, localAppState || null),\n files: (data === null || data === void 0 ? void 0 : data.files) || {}\n };\n};\n\nconst restoreLibraryItem = libraryItem => {\n const elements = restoreElements((0,_element__WEBPACK_IMPORTED_MODULE_0__.getNonDeletedElements)(libraryItem.elements), null);\n return elements.length ? Object.assign(Object.assign({}, libraryItem), {\n elements\n }) : null;\n};\n\nconst restoreLibraryItems = (libraryItems = [], defaultStatus) => {\n const restoredItems = [];\n\n for (const item of libraryItems) {\n // migrate older libraries\n if (Array.isArray(item)) {\n const restoredItem = restoreLibraryItem({\n status: defaultStatus,\n elements: item,\n id: (0,_random__WEBPACK_IMPORTED_MODULE_2__.randomId)(),\n created: Date.now()\n });\n\n if (restoredItem) {\n restoredItems.push(restoredItem);\n }\n } else {\n const _item = item;\n const restoredItem = restoreLibraryItem(Object.assign(Object.assign({}, _item), {\n id: _item.id || (0,_random__WEBPACK_IMPORTED_MODULE_2__.randomId)(),\n status: _item.status || defaultStatus,\n created: _item.created || Date.now()\n }));\n\n if (restoredItem) {\n restoredItems.push(restoredItem);\n }\n }\n }\n\n return restoredItems;\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../data/restore.ts?");
3571
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AllowedExcalidrawActiveTools\": () => (/* binding */ AllowedExcalidrawActiveTools),\n/* harmony export */ \"restore\": () => (/* binding */ restore),\n/* harmony export */ \"restoreAppState\": () => (/* binding */ restoreAppState),\n/* harmony export */ \"restoreElements\": () => (/* binding */ restoreElements),\n/* harmony export */ \"restoreLibraryItems\": () => (/* binding */ restoreLibraryItems)\n/* harmony export */ });\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../element */ \"../../element/index.ts\");\n/* harmony import */ var _element_typeChecks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../element/typeChecks */ \"../../element/typeChecks.ts\");\n/* harmony import */ var _random__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../random */ \"../../random.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants */ \"../../constants.ts\");\n/* harmony import */ var _appState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../appState */ \"../../appState.ts\");\n/* harmony import */ var _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../element/linearElementEditor */ \"../../element/linearElementEditor.ts\");\n/* harmony import */ var _element_mutateElement__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../element/mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils */ \"../../utils.ts\");\n/* harmony import */ var _element_textElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../element/textElement */ \"../../element/textElement.ts\");\n/* harmony import */ var _url__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./url */ \"../../data/url.ts\");\n\n\n\n\n\n\n\n\n\n\n\nconst AllowedExcalidrawActiveTools = {\n selection: true,\n text: true,\n rectangle: true,\n diamond: true,\n ellipse: true,\n line: true,\n image: true,\n arrow: true,\n freedraw: true,\n eraser: false,\n custom: true,\n frame: true,\n embeddable: true,\n hand: true,\n mermaid: true,\n laser: false\n};\n\nconst getFontFamilyByName = fontFamilyName => {\n if (Object.keys(_constants__WEBPACK_IMPORTED_MODULE_3__.FONT_FAMILY).includes(fontFamilyName)) {\n return _constants__WEBPACK_IMPORTED_MODULE_3__.FONT_FAMILY[fontFamilyName];\n }\n\n return _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_FONT_FAMILY;\n};\n\nconst repairBinding = binding => {\n if (!binding) {\n return null;\n }\n\n return Object.assign(Object.assign({}, binding), {\n focus: binding.focus || 0\n });\n};\n\nconst restoreElementWithProperties = (element, extra) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\n\n const base = {\n type: extra.type || element.type,\n // all elements must have version > 0 so getSceneVersion() will pick up\n // newly added elements\n version: element.version || 1,\n versionNonce: (_a = element.versionNonce) !== null && _a !== void 0 ? _a : 0,\n isDeleted: (_b = element.isDeleted) !== null && _b !== void 0 ? _b : false,\n id: element.id || (0,_random__WEBPACK_IMPORTED_MODULE_2__.randomId)(),\n fillStyle: element.fillStyle || _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.fillStyle,\n strokeWidth: element.strokeWidth || _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.strokeWidth,\n strokeStyle: (_c = element.strokeStyle) !== null && _c !== void 0 ? _c : _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.strokeStyle,\n roughness: (_d = element.roughness) !== null && _d !== void 0 ? _d : _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.roughness,\n opacity: element.opacity == null ? _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.opacity : element.opacity,\n angle: element.angle || 0,\n x: (_f = (_e = extra.x) !== null && _e !== void 0 ? _e : element.x) !== null && _f !== void 0 ? _f : 0,\n y: (_h = (_g = extra.y) !== null && _g !== void 0 ? _g : element.y) !== null && _h !== void 0 ? _h : 0,\n strokeColor: element.strokeColor || _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.strokeColor,\n backgroundColor: element.backgroundColor || _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_ELEMENT_PROPS.backgroundColor,\n width: element.width || 0,\n height: element.height || 0,\n seed: (_j = element.seed) !== null && _j !== void 0 ? _j : 1,\n groupIds: (_k = element.groupIds) !== null && _k !== void 0 ? _k : [],\n frameId: (_l = element.frameId) !== null && _l !== void 0 ? _l : null,\n roundness: element.roundness ? element.roundness : element.strokeSharpness === \"round\" ? {\n // for old elements that would now use adaptive radius algo,\n // use legacy algo instead\n type: (0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_1__.isUsingAdaptiveRadius)(element.type) ? _constants__WEBPACK_IMPORTED_MODULE_3__.ROUNDNESS.LEGACY : _constants__WEBPACK_IMPORTED_MODULE_3__.ROUNDNESS.PROPORTIONAL_RADIUS\n } : null,\n boundElements: element.boundElementIds ? element.boundElementIds.map(id => ({\n type: \"arrow\",\n id\n })) : (_m = element.boundElements) !== null && _m !== void 0 ? _m : [],\n updated: (_o = element.updated) !== null && _o !== void 0 ? _o : (0,_utils__WEBPACK_IMPORTED_MODULE_7__.getUpdatedTimestamp)(),\n link: element.link ? (0,_url__WEBPACK_IMPORTED_MODULE_9__.normalizeLink)(element.link) : null,\n locked: (_p = element.locked) !== null && _p !== void 0 ? _p : false\n };\n\n if (\"customData\" in element) {\n base.customData = element.customData;\n }\n\n if (_constants__WEBPACK_IMPORTED_MODULE_3__.PRECEDING_ELEMENT_KEY in element) {\n base[_constants__WEBPACK_IMPORTED_MODULE_3__.PRECEDING_ELEMENT_KEY] = element[_constants__WEBPACK_IMPORTED_MODULE_3__.PRECEDING_ELEMENT_KEY];\n }\n\n return Object.assign(Object.assign(Object.assign({}, base), (0,_element__WEBPACK_IMPORTED_MODULE_0__.getNormalizedDimensions)(base)), extra);\n};\n\nconst restoreElement = (element, refreshDimensions = false) => {\n var _a, _b, _c, _d;\n\n switch (element.type) {\n case \"text\":\n let fontSize = element.fontSize;\n let fontFamily = element.fontFamily;\n\n if (\"font\" in element) {\n const [fontPx, _fontFamily] = element.font.split(\" \");\n fontSize = parseFloat(fontPx);\n fontFamily = getFontFamilyByName(_fontFamily);\n }\n\n const text = (_a = element.text) !== null && _a !== void 0 ? _a : \"\"; // line-height might not be specified either when creating elements\n // programmatically, or when importing old diagrams.\n // For the latter we want to detect the original line height which\n // will likely differ from our per-font fixed line height we now use,\n // to maintain backward compatibility.\n\n const lineHeight = element.lineHeight || (element.height ? // detect line-height from current element height and font-size\n (0,_element_textElement__WEBPACK_IMPORTED_MODULE_8__.detectLineHeight)(element) : // no element height likely means programmatic use, so default\n // to a fixed line height\n (0,_element_textElement__WEBPACK_IMPORTED_MODULE_8__.getDefaultLineHeight)(element.fontFamily));\n const baseline = (0,_element_textElement__WEBPACK_IMPORTED_MODULE_8__.measureBaseline)(element.text, (0,_utils__WEBPACK_IMPORTED_MODULE_7__.getFontString)(element), lineHeight);\n element = restoreElementWithProperties(element, {\n fontSize,\n fontFamily,\n text,\n rawText: (_b = element.rawText) !== null && _b !== void 0 ? _b : \"\",\n textAlign: element.textAlign || _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_TEXT_ALIGN,\n verticalAlign: element.verticalAlign || _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_VERTICAL_ALIGN,\n containerId: (_c = element.containerId) !== null && _c !== void 0 ? _c : null,\n originalText: element.originalText || text,\n lineHeight,\n baseline\n });\n\n if (refreshDimensions) {\n element = Object.assign(Object.assign({}, element), (0,_element__WEBPACK_IMPORTED_MODULE_0__.refreshTextDimensions)(element));\n }\n\n return element;\n\n case \"freedraw\":\n {\n return restoreElementWithProperties(element, {\n points: element.points,\n lastCommittedPoint: null,\n simulatePressure: element.simulatePressure,\n pressures: element.pressures\n });\n }\n\n case \"image\":\n return restoreElementWithProperties(element, {\n status: element.status || \"pending\",\n fileId: element.fileId,\n scale: element.scale || [1, 1]\n });\n\n case \"line\": // @ts-ignore LEGACY type\n // eslint-disable-next-line no-fallthrough\n\n case \"draw\":\n case \"arrow\":\n {\n const {\n startArrowhead = null,\n endArrowhead = element.type === \"arrow\" ? \"arrow\" : null\n } = element;\n let x = element.x;\n let y = element.y;\n let points = // migrate old arrow model to new one\n !Array.isArray(element.points) || element.points.length < 2 ? [[0, 0], [element.width, element.height]] : element.points;\n\n if (points[0][0] !== 0 || points[0][1] !== 0) {\n ({\n points,\n x,\n y\n } = _element_linearElementEditor__WEBPACK_IMPORTED_MODULE_5__.LinearElementEditor.getNormalizedPoints(element));\n }\n\n return restoreElementWithProperties(element, {\n type: element.type === \"draw\" ? \"line\" : element.type,\n startBinding: repairBinding(element.startBinding),\n endBinding: repairBinding(element.endBinding),\n lastCommittedPoint: null,\n startArrowhead,\n endArrowhead,\n points,\n x,\n y\n });\n }\n // generic elements\n\n case \"ellipse\":\n return restoreElementWithProperties(element, {});\n\n case \"rectangle\":\n return restoreElementWithProperties(element, {});\n\n case \"diamond\":\n return restoreElementWithProperties(element, {});\n\n case \"embeddable\":\n return restoreElementWithProperties(element, {\n validated: null\n });\n\n case \"frame\":\n return restoreElementWithProperties(element, {\n name: (_d = element.name) !== null && _d !== void 0 ? _d : null\n });\n // Don't use default case so as to catch a missing an element type case.\n // We also don't want to throw, but instead return void so we filter\n // out these unsupported elements from the restored array.\n }\n};\n/**\r\n * Repairs contaienr element's boundElements array by removing duplicates and\r\n * fixing containerId of bound elements if not present. Also removes any\r\n * bound elements that do not exist in the elements array.\r\n *\r\n * NOTE mutates elements.\r\n */\n\n\nconst repairContainerElement = (container, elementsMap) => {\n if (container.boundElements) {\n // copy because we're not cloning on restore, and we don't want to mutate upstream\n const boundElements = container.boundElements.slice(); // dedupe bindings & fix boundElement.containerId if not set already\n\n const boundIds = new Set();\n container.boundElements = boundElements.reduce((acc, binding) => {\n const boundElement = elementsMap.get(binding.id);\n\n if (boundElement && !boundIds.has(binding.id)) {\n boundIds.add(binding.id);\n\n if (boundElement.isDeleted) {\n return acc;\n }\n\n acc.push(binding);\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_1__.isTextElement)(boundElement) && // being slightly conservative here, preserving existing containerId\n // if defined, lest boundElements is stale\n !boundElement.containerId) {\n boundElement.containerId = container.id;\n }\n }\n\n return acc;\n }, []);\n }\n};\n/**\r\n * Repairs target bound element's container's boundElements array,\r\n * or removes contaienrId if container does not exist.\r\n *\r\n * NOTE mutates elements.\r\n */\n\n\nconst repairBoundElement = (boundElement, elementsMap) => {\n const container = boundElement.containerId ? elementsMap.get(boundElement.containerId) : null;\n\n if (!container) {\n boundElement.containerId = null;\n return;\n }\n\n if (boundElement.isDeleted) {\n return;\n }\n\n if (container.boundElements && !container.boundElements.find(binding => binding.id === boundElement.id)) {\n // copy because we're not cloning on restore, and we don't want to mutate upstream\n const boundElements = (container.boundElements || (container.boundElements = [])).slice();\n boundElements.push({\n type: \"text\",\n id: boundElement.id\n });\n container.boundElements = boundElements;\n }\n};\n/**\r\n * Remove an element's frameId if its containing frame is non-existent\r\n *\r\n * NOTE mutates elements.\r\n */\n\n\nconst repairFrameMembership = (element, elementsMap) => {\n if (element.frameId) {\n const containingFrame = elementsMap.get(element.frameId);\n\n if (!containingFrame) {\n element.frameId = null;\n }\n }\n};\n\nconst restoreElements = (elements,\n/** NOTE doesn't serve for reconciliation */\nlocalElements, opts) => {\n // used to detect duplicate top-level element ids\n const existingIds = new Set();\n const localElementsMap = localElements ? (0,_utils__WEBPACK_IMPORTED_MODULE_7__.arrayToMap)(localElements) : null;\n const restoredElements = (elements || []).reduce((elements, element) => {\n // filtering out selection, which is legacy, no longer kept in elements,\n // and causing issues if retained\n if (element.type !== \"selection\" && !(0,_element__WEBPACK_IMPORTED_MODULE_0__.isInvisiblySmallElement)(element)) {\n let migratedElement = restoreElement(element, opts === null || opts === void 0 ? void 0 : opts.refreshDimensions);\n\n if (migratedElement) {\n const localElement = localElementsMap === null || localElementsMap === void 0 ? void 0 : localElementsMap.get(element.id);\n\n if (localElement && localElement.version > migratedElement.version) {\n migratedElement = (0,_element_mutateElement__WEBPACK_IMPORTED_MODULE_6__.bumpVersion)(migratedElement, localElement.version);\n }\n\n if (existingIds.has(migratedElement.id)) {\n migratedElement = Object.assign(Object.assign({}, migratedElement), {\n id: (0,_random__WEBPACK_IMPORTED_MODULE_2__.randomId)()\n });\n }\n\n existingIds.add(migratedElement.id);\n elements.push(migratedElement);\n }\n }\n\n return elements;\n }, []);\n\n if (!(opts === null || opts === void 0 ? void 0 : opts.repairBindings)) {\n return restoredElements;\n } // repair binding. Mutates elements.\n\n\n const restoredElementsMap = (0,_utils__WEBPACK_IMPORTED_MODULE_7__.arrayToMap)(restoredElements);\n\n for (const element of restoredElements) {\n if (element.frameId) {\n repairFrameMembership(element, restoredElementsMap);\n }\n\n if ((0,_element_typeChecks__WEBPACK_IMPORTED_MODULE_1__.isTextElement)(element) && element.containerId) {\n repairBoundElement(element, restoredElementsMap);\n } else if (element.boundElements) {\n repairContainerElement(element, restoredElementsMap);\n }\n }\n\n return restoredElements;\n};\n\nconst coalesceAppStateValue = (key, appState, defaultAppState) => {\n const value = appState[key]; // NOTE the value! assertion is needed in TS 4.5.5 (fixed in newer versions)\n\n return value !== undefined ? value : defaultAppState[key];\n};\n\nconst LegacyAppStateMigrations = {\n isSidebarDocked: (appState, defaultAppState) => {\n var _a;\n\n return [\"defaultSidebarDockedPreference\", (_a = appState.isSidebarDocked) !== null && _a !== void 0 ? _a : coalesceAppStateValue(\"defaultSidebarDockedPreference\", appState, defaultAppState)];\n }\n};\nconst restoreAppState = (appState, localAppState) => {\n var _a, _b, _c, _d;\n\n appState = appState || {};\n const defaultAppState = (0,_appState__WEBPACK_IMPORTED_MODULE_4__.getDefaultAppState)();\n const nextAppState = {}; // first, migrate all legacy AppState properties to new ones. We do it\n // in one go before migrate the rest of the properties in case the new ones\n // depend on checking any other key (i.e. they are coupled)\n\n for (const legacyKey of Object.keys(LegacyAppStateMigrations)) {\n if (legacyKey in appState) {\n const [nextKey, nextValue] = LegacyAppStateMigrations[legacyKey](appState, defaultAppState);\n nextAppState[nextKey] = nextValue;\n }\n }\n\n for (const [key, defaultValue] of Object.entries(defaultAppState)) {\n // if AppState contains a legacy key, prefer that one and migrate its\n // value to the new one\n const suppliedValue = appState[key];\n const localValue = localAppState ? localAppState[key] : undefined;\n nextAppState[key] = suppliedValue !== undefined ? suppliedValue : localValue !== undefined ? localValue : defaultValue;\n }\n\n return Object.assign(Object.assign({}, nextAppState), {\n cursorButton: (localAppState === null || localAppState === void 0 ? void 0 : localAppState.cursorButton) || \"up\",\n // reset on fresh restore so as to hide the UI button if penMode not active\n penDetected: (_a = localAppState === null || localAppState === void 0 ? void 0 : localAppState.penDetected) !== null && _a !== void 0 ? _a : appState.penMode ? (_b = appState.penDetected) !== null && _b !== void 0 ? _b : false : false,\n activeTool: Object.assign(Object.assign({}, (0,_utils__WEBPACK_IMPORTED_MODULE_7__.updateActiveTool)(defaultAppState, nextAppState.activeTool.type && AllowedExcalidrawActiveTools[nextAppState.activeTool.type] ? nextAppState.activeTool : {\n type: \"selection\"\n })), {\n lastActiveTool: null,\n locked: (_c = nextAppState.activeTool.locked) !== null && _c !== void 0 ? _c : false\n }),\n // Migrates from previous version where appState.zoom was a number\n zoom: typeof appState.zoom === \"number\" ? {\n value: appState.zoom\n } : ((_d = appState.zoom) === null || _d === void 0 ? void 0 : _d.value) ? appState.zoom : defaultAppState.zoom,\n openSidebar: // string (legacy)\n typeof appState.openSidebar === \"string\" ? {\n name: _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_SIDEBAR.name\n } : nextAppState.openSidebar\n });\n};\nconst restore = (data,\n/**\r\n * Local AppState (`this.state` or initial state from localStorage) so that we\r\n * don't overwrite local state with default values (when values not\r\n * explicitly specified).\r\n * Supply `null` if you can't get access to it.\r\n */\nlocalAppState, localElements, elementsConfig) => {\n return {\n elements: restoreElements(data === null || data === void 0 ? void 0 : data.elements, localElements, elementsConfig),\n appState: restoreAppState(data === null || data === void 0 ? void 0 : data.appState, localAppState || null),\n files: (data === null || data === void 0 ? void 0 : data.files) || {}\n };\n};\n\nconst restoreLibraryItem = libraryItem => {\n const elements = restoreElements((0,_element__WEBPACK_IMPORTED_MODULE_0__.getNonDeletedElements)(libraryItem.elements), null);\n return elements.length ? Object.assign(Object.assign({}, libraryItem), {\n elements\n }) : null;\n};\n\nconst restoreLibraryItems = (libraryItems = [], defaultStatus) => {\n const restoredItems = [];\n\n for (const item of libraryItems) {\n // migrate older libraries\n if (Array.isArray(item)) {\n const restoredItem = restoreLibraryItem({\n status: defaultStatus,\n elements: item,\n id: (0,_random__WEBPACK_IMPORTED_MODULE_2__.randomId)(),\n created: Date.now()\n });\n\n if (restoredItem) {\n restoredItems.push(restoredItem);\n }\n } else {\n const _item = item;\n const restoredItem = restoreLibraryItem(Object.assign(Object.assign({}, _item), {\n id: _item.id || (0,_random__WEBPACK_IMPORTED_MODULE_2__.randomId)(),\n status: _item.status || defaultStatus,\n created: _item.created || Date.now()\n }));\n\n if (restoredItem) {\n restoredItems.push(restoredItem);\n }\n }\n }\n\n return restoredItems;\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../data/restore.ts?");
3517
3572
 
3518
3573
  /***/ }),
3519
3574
 
@@ -3601,7 +3656,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
3601
3656
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3602
3657
 
3603
3658
  "use strict";
3604
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"dragNewElement\": () => (/* binding */ dragNewElement),\n/* harmony export */ \"dragSelectedElements\": () => (/* binding */ dragSelectedElements),\n/* harmony export */ \"getDragOffsetXY\": () => (/* binding */ getDragOffsetXY)\n/* harmony export */ });\n/* harmony import */ var _binding__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./binding */ \"../../element/binding.ts\");\n/* harmony import */ var _bounds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bounds */ \"../../element/bounds.ts\");\n/* harmony import */ var _mutateElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _sizeHelpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sizeHelpers */ \"../../element/sizeHelpers.ts\");\n/* harmony import */ var _textElement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./textElement */ \"../../element/textElement.ts\");\n/* harmony import */ var _groups__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../groups */ \"../../groups.ts\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../math */ \"../../math.ts\");\n/* harmony import */ var _typeChecks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./typeChecks */ \"../../element/typeChecks.ts\");\n\n\n\n\n\n\n\n\nconst dragSelectedElements = (pointerDownState, selectedElements, offset, appState, scene, snapOffset, gridSize) => {\n // we do not want a frame and its elements to be selected at the same time\n // but when it happens (due to some bug), we want to avoid updating element\n // in the frame twice, hence the use of set\n const elementsToUpdate = new Set(selectedElements);\n const frames = selectedElements.filter(e => (0,_typeChecks__WEBPACK_IMPORTED_MODULE_7__.isFrameElement)(e)).map(f => f.id);\n\n if (frames.length > 0) {\n const elementsInFrames = scene.getNonDeletedElements().filter(e => !(0,_typeChecks__WEBPACK_IMPORTED_MODULE_7__.isBoundToContainer)(e)).filter(e => e.frameId !== null).filter(e => frames.includes(e.frameId));\n elementsInFrames.forEach(element => elementsToUpdate.add(element));\n }\n\n elementsToUpdate.forEach(element => {\n updateElementCoords(pointerDownState, element, offset, snapOffset, gridSize); // update coords of bound text only if we're dragging the container directly\n // (we don't drag the group that it's part of)\n\n if ( // Don't update coords of arrow label since we calculate its position during render\n !(0,_typeChecks__WEBPACK_IMPORTED_MODULE_7__.isArrowElement)(element) && ( // container isn't part of any group\n // (perf optim so we don't check `isSelectedViaGroup()` in every case)\n !element.groupIds.length || // container is part of a group, but we're dragging the container directly\n appState.editingGroupId && !(0,_groups__WEBPACK_IMPORTED_MODULE_5__.isSelectedViaGroup)(appState, element))) {\n const textElement = (0,_textElement__WEBPACK_IMPORTED_MODULE_4__.getBoundTextElement)(element);\n\n if (textElement) {\n updateElementCoords(pointerDownState, textElement, offset, snapOffset, gridSize);\n }\n }\n\n (0,_binding__WEBPACK_IMPORTED_MODULE_0__.updateBoundElements)(element, {\n simultaneouslyUpdated: Array.from(elementsToUpdate)\n });\n });\n};\n\nconst updateElementCoords = (pointerDownState, element, dragOffset, snapOffset, gridSize) => {\n var _a;\n\n const originalElement = (_a = pointerDownState.originalElements.get(element.id)) !== null && _a !== void 0 ? _a : element;\n let nextX = originalElement.x + dragOffset.x + snapOffset.x;\n let nextY = originalElement.y + dragOffset.y + snapOffset.y;\n\n if (snapOffset.x === 0 || snapOffset.y === 0) {\n const [nextGridX, nextGridY] = (0,_math__WEBPACK_IMPORTED_MODULE_6__.getGridPoint)(originalElement.x + dragOffset.x, originalElement.y + dragOffset.y, gridSize);\n\n if (snapOffset.x === 0) {\n nextX = nextGridX;\n }\n\n if (snapOffset.y === 0) {\n nextY = nextGridY;\n }\n }\n\n (0,_mutateElement__WEBPACK_IMPORTED_MODULE_2__.mutateElement)(element, {\n x: nextX,\n y: nextY\n });\n};\n\nconst getDragOffsetXY = (selectedElements, x, y) => {\n const [x1, y1] = (0,_bounds__WEBPACK_IMPORTED_MODULE_1__.getCommonBounds)(selectedElements);\n return [x - x1, y - y1];\n};\nconst dragNewElement = (draggingElement, elementType, originX, originY, x, y, width, height, shouldMaintainAspectRatio, shouldResizeFromCenter,\n/** whether to keep given aspect ratio when `isResizeWithSidesSameLength` is\r\n true */\nwidthAspectRatio, originOffset = null) => {\n var _a, _b;\n\n if (shouldMaintainAspectRatio && draggingElement.type !== \"selection\") {\n if (widthAspectRatio) {\n height = width / widthAspectRatio;\n } else {\n // Depending on where the cursor is at (x, y) relative to where the starting point is\n // (originX, originY), we use ONLY width or height to control size increase.\n // This allows the cursor to always \"stick\" to one of the sides of the bounding box.\n if (Math.abs(y - originY) > Math.abs(x - originX)) {\n ({\n width,\n height\n } = (0,_sizeHelpers__WEBPACK_IMPORTED_MODULE_3__.getPerfectElementSize)(elementType, height, x < originX ? -width : width));\n } else {\n ({\n width,\n height\n } = (0,_sizeHelpers__WEBPACK_IMPORTED_MODULE_3__.getPerfectElementSize)(elementType, width, y < originY ? -height : height));\n }\n\n if (height < 0) {\n height = -height;\n }\n }\n }\n\n let newX = x < originX ? originX - width : originX;\n let newY = y < originY ? originY - height : originY;\n\n if (shouldResizeFromCenter) {\n width += width;\n height += height;\n newX = originX - width / 2;\n newY = originY - height / 2;\n }\n\n if (width !== 0 && height !== 0) {\n (0,_mutateElement__WEBPACK_IMPORTED_MODULE_2__.mutateElement)(draggingElement, {\n x: newX + ((_a = originOffset === null || originOffset === void 0 ? void 0 : originOffset.x) !== null && _a !== void 0 ? _a : 0),\n y: newY + ((_b = originOffset === null || originOffset === void 0 ? void 0 : originOffset.y) !== null && _b !== void 0 ? _b : 0),\n width,\n height\n });\n }\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../element/dragElements.ts?");
3659
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"dragNewElement\": () => (/* binding */ dragNewElement),\n/* harmony export */ \"dragSelectedElements\": () => (/* binding */ dragSelectedElements),\n/* harmony export */ \"getDragOffsetXY\": () => (/* binding */ getDragOffsetXY)\n/* harmony export */ });\n/* harmony import */ var _binding__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./binding */ \"../../element/binding.ts\");\n/* harmony import */ var _bounds__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bounds */ \"../../element/bounds.ts\");\n/* harmony import */ var _mutateElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _sizeHelpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sizeHelpers */ \"../../element/sizeHelpers.ts\");\n/* harmony import */ var _textElement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./textElement */ \"../../element/textElement.ts\");\n/* harmony import */ var _groups__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../groups */ \"../../groups.ts\");\n/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../math */ \"../../math.ts\");\n/* harmony import */ var _typeChecks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./typeChecks */ \"../../element/typeChecks.ts\");\n\n\n\n\n\n\n\n\nconst dragSelectedElements = (pointerDownState, selectedElements, offset, appState, scene, snapOffset, gridSize) => {\n // we do not want a frame and its elements to be selected at the same time\n // but when it happens (due to some bug), we want to avoid updating element\n // in the frame twice, hence the use of set\n const elementsToUpdate = new Set(selectedElements);\n const frames = selectedElements.filter(e => (0,_typeChecks__WEBPACK_IMPORTED_MODULE_7__.isFrameElement)(e)).map(f => f.id);\n\n if (frames.length > 0) {\n const elementsInFrames = scene.getNonDeletedElements().filter(e => !(0,_typeChecks__WEBPACK_IMPORTED_MODULE_7__.isBoundToContainer)(e)).filter(e => e.frameId !== null).filter(e => frames.includes(e.frameId));\n elementsInFrames.forEach(element => elementsToUpdate.add(element));\n }\n\n const commonBounds = (0,_bounds__WEBPACK_IMPORTED_MODULE_1__.getCommonBounds)(Array.from(elementsToUpdate).map(el => {\n var _a;\n\n return (_a = pointerDownState.originalElements.get(el.id)) !== null && _a !== void 0 ? _a : el;\n }));\n const adjustedOffset = calculateOffset(commonBounds, offset, snapOffset, gridSize);\n elementsToUpdate.forEach(element => {\n updateElementCoords(pointerDownState, element, adjustedOffset); // update coords of bound text only if we're dragging the container directly\n // (we don't drag the group that it's part of)\n\n if ( // Don't update coords of arrow label since we calculate its position during render\n !(0,_typeChecks__WEBPACK_IMPORTED_MODULE_7__.isArrowElement)(element) && ( // container isn't part of any group\n // (perf optim so we don't check `isSelectedViaGroup()` in every case)\n !element.groupIds.length || // container is part of a group, but we're dragging the container directly\n appState.editingGroupId && !(0,_groups__WEBPACK_IMPORTED_MODULE_5__.isSelectedViaGroup)(appState, element))) {\n const textElement = (0,_textElement__WEBPACK_IMPORTED_MODULE_4__.getBoundTextElement)(element);\n\n if (textElement) {\n updateElementCoords(pointerDownState, textElement, adjustedOffset);\n }\n }\n\n (0,_binding__WEBPACK_IMPORTED_MODULE_0__.updateBoundElements)(element, {\n simultaneouslyUpdated: Array.from(elementsToUpdate)\n });\n });\n};\n\nconst calculateOffset = (commonBounds, dragOffset, snapOffset, gridSize) => {\n const [x, y] = commonBounds;\n let nextX = x + dragOffset.x + snapOffset.x;\n let nextY = y + dragOffset.y + snapOffset.y;\n\n if (snapOffset.x === 0 || snapOffset.y === 0) {\n const [nextGridX, nextGridY] = (0,_math__WEBPACK_IMPORTED_MODULE_6__.getGridPoint)(x + dragOffset.x, y + dragOffset.y, gridSize);\n\n if (snapOffset.x === 0) {\n nextX = nextGridX;\n }\n\n if (snapOffset.y === 0) {\n nextY = nextGridY;\n }\n }\n\n return {\n x: nextX - x,\n y: nextY - y\n };\n};\n\nconst updateElementCoords = (pointerDownState, element, dragOffset) => {\n var _a;\n\n const originalElement = (_a = pointerDownState.originalElements.get(element.id)) !== null && _a !== void 0 ? _a : element;\n const nextX = originalElement.x + dragOffset.x;\n const nextY = originalElement.y + dragOffset.y;\n (0,_mutateElement__WEBPACK_IMPORTED_MODULE_2__.mutateElement)(element, {\n x: nextX,\n y: nextY\n });\n};\n\nconst getDragOffsetXY = (selectedElements, x, y) => {\n const [x1, y1] = (0,_bounds__WEBPACK_IMPORTED_MODULE_1__.getCommonBounds)(selectedElements);\n return [x - x1, y - y1];\n};\nconst dragNewElement = (draggingElement, elementType, originX, originY, x, y, width, height, shouldMaintainAspectRatio, shouldResizeFromCenter,\n/** whether to keep given aspect ratio when `isResizeWithSidesSameLength` is\r\n true */\nwidthAspectRatio, originOffset = null) => {\n var _a, _b;\n\n if (shouldMaintainAspectRatio && draggingElement.type !== \"selection\") {\n if (widthAspectRatio) {\n height = width / widthAspectRatio;\n } else {\n // Depending on where the cursor is at (x, y) relative to where the starting point is\n // (originX, originY), we use ONLY width or height to control size increase.\n // This allows the cursor to always \"stick\" to one of the sides of the bounding box.\n if (Math.abs(y - originY) > Math.abs(x - originX)) {\n ({\n width,\n height\n } = (0,_sizeHelpers__WEBPACK_IMPORTED_MODULE_3__.getPerfectElementSize)(elementType, height, x < originX ? -width : width));\n } else {\n ({\n width,\n height\n } = (0,_sizeHelpers__WEBPACK_IMPORTED_MODULE_3__.getPerfectElementSize)(elementType, width, y < originY ? -height : height));\n }\n\n if (height < 0) {\n height = -height;\n }\n }\n }\n\n let newX = x < originX ? originX - width : originX;\n let newY = y < originY ? originY - height : originY;\n\n if (shouldResizeFromCenter) {\n width += width;\n height += height;\n newX = originX - width / 2;\n newY = originY - height / 2;\n }\n\n if (width !== 0 && height !== 0) {\n (0,_mutateElement__WEBPACK_IMPORTED_MODULE_2__.mutateElement)(draggingElement, {\n x: newX + ((_a = originOffset === null || originOffset === void 0 ? void 0 : originOffset.x) !== null && _a !== void 0 ? _a : 0),\n y: newY + ((_b = originOffset === null || originOffset === void 0 ? void 0 : originOffset.y) !== null && _b !== void 0 ? _b : 0),\n width,\n height\n });\n }\n};\n\n//# sourceURL=webpack://ExcalidrawLib/../../element/dragElements.ts?");
3605
3660
 
3606
3661
  /***/ }),
3607
3662
 
@@ -3700,7 +3755,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
3700
3755
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3701
3756
 
3702
3757
  "use strict";
3703
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"showSelectedShapeActions\": () => (/* binding */ showSelectedShapeActions)\n/* harmony export */ });\n/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scene */ \"../../scene/index.ts\");\n\nconst showSelectedShapeActions = (appState, elements) => Boolean(!appState.viewModeEnabled && (appState.activeTool.type !== \"custom\" && (appState.editingElement || appState.activeTool.type !== \"selection\" && appState.activeTool.type !== \"eraser\" && appState.activeTool.type !== \"hand\") || (0,_scene__WEBPACK_IMPORTED_MODULE_0__.getSelectedElements)(elements, appState).length));\n\n//# sourceURL=webpack://ExcalidrawLib/../../element/showSelectedShapeActions.ts?");
3758
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"showSelectedShapeActions\": () => (/* binding */ showSelectedShapeActions)\n/* harmony export */ });\n/* harmony import */ var _scene__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scene */ \"../../scene/index.ts\");\n\nconst showSelectedShapeActions = (appState, elements) => Boolean(!appState.viewModeEnabled && (appState.activeTool.type !== \"custom\" && (appState.editingElement || appState.activeTool.type !== \"selection\" && appState.activeTool.type !== \"eraser\" && appState.activeTool.type !== \"hand\" && appState.activeTool.type !== \"laser\") || (0,_scene__WEBPACK_IMPORTED_MODULE_0__.getSelectedElements)(elements, appState).length));\n\n//# sourceURL=webpack://ExcalidrawLib/../../element/showSelectedShapeActions.ts?");
3704
3759
 
3705
3760
  /***/ }),
3706
3761
 
@@ -4019,7 +4074,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4019
4074
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4020
4075
 
4021
4076
  "use strict";
4022
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Button\": () => (/* reexport safe */ _components_Button__WEBPACK_IMPORTED_MODULE_23__.Button),\n/* harmony export */ \"DefaultSidebar\": () => (/* reexport safe */ _components_DefaultSidebar__WEBPACK_IMPORTED_MODULE_24__.DefaultSidebar),\n/* harmony export */ \"Excalidraw\": () => (/* binding */ Excalidraw),\n/* harmony export */ \"FONT_FAMILY\": () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_8__.FONT_FAMILY),\n/* harmony export */ \"Footer\": () => (/* reexport safe */ _components_footer_FooterCenter__WEBPACK_IMPORTED_MODULE_10__[\"default\"]),\n/* harmony export */ \"LiveCollaborationTrigger\": () => (/* reexport safe */ _components_live_collaboration_LiveCollaborationTrigger__WEBPACK_IMPORTED_MODULE_13__[\"default\"]),\n/* harmony export */ \"MIME_TYPES\": () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_8__.MIME_TYPES),\n/* harmony export */ \"MainMenu\": () => (/* reexport safe */ _components_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_11__[\"default\"]),\n/* harmony export */ \"Sidebar\": () => (/* reexport safe */ _components_Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_22__.Sidebar),\n/* harmony export */ \"THEME\": () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_8__.THEME),\n/* harmony export */ \"WelcomeScreen\": () => (/* reexport safe */ _components_welcome_screen_WelcomeScreen__WEBPACK_IMPORTED_MODULE_12__[\"default\"]),\n/* harmony export */ \"bumpVersion\": () => (/* reexport safe */ _element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.bumpVersion),\n/* harmony export */ \"convertToExcalidrawElements\": () => (/* reexport safe */ _data_transform__WEBPACK_IMPORTED_MODULE_26__.convertToExcalidrawElements),\n/* harmony export */ \"defaultLang\": () => (/* reexport safe */ _i18n__WEBPACK_IMPORTED_MODULE_7__.defaultLang),\n/* harmony export */ \"determineFocusDistance\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.determineFocusDistance),\n/* harmony export */ \"exportToBlob\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.exportToBlob),\n/* harmony export */ \"exportToCanvas\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.exportToCanvas),\n/* harmony export */ \"exportToClipboard\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.exportToClipboard),\n/* harmony export */ \"exportToSvg\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.exportToSvg),\n/* harmony export */ \"getBoundTextMaxWidth\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.getBoundTextMaxWidth),\n/* harmony export */ \"getCommonBoundingBox\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.getCommonBoundingBox),\n/* harmony export */ \"getDefaultLineHeight\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.getDefaultLineHeight),\n/* harmony export */ \"getEmbedLink\": () => (/* reexport safe */ _element_embeddable__WEBPACK_IMPORTED_MODULE_21__.getEmbedLink),\n/* harmony export */ \"getFontString\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.getFontString),\n/* harmony export */ \"getFreeDrawSvgPath\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.getFreeDrawSvgPath),\n/* harmony export */ \"getMaximumGroups\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.getMaximumGroups),\n/* harmony export */ \"getNonDeletedElements\": () => (/* reexport safe */ _element__WEBPACK_IMPORTED_MODULE_15__.getNonDeletedElements),\n/* harmony export */ \"getSceneVersion\": () => (/* reexport safe */ _element__WEBPACK_IMPORTED_MODULE_15__.getSceneVersion),\n/* harmony export */ \"intersectElementWithLine\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.intersectElementWithLine),\n/* harmony export */ \"isInvisiblySmallElement\": () => (/* reexport safe */ _element__WEBPACK_IMPORTED_MODULE_15__.isInvisiblySmallElement),\n/* harmony export */ \"isLinearElement\": () => (/* reexport safe */ _element_typeChecks__WEBPACK_IMPORTED_MODULE_18__.isLinearElement),\n/* harmony export */ \"languages\": () => (/* reexport safe */ _i18n__WEBPACK_IMPORTED_MODULE_7__.languages),\n/* harmony export */ \"loadFromBlob\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.loadFromBlob),\n/* harmony export */ \"loadLibraryFromBlob\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.loadLibraryFromBlob),\n/* harmony export */ \"loadSceneOrLibraryFromBlob\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.loadSceneOrLibraryFromBlob),\n/* harmony export */ \"measureText\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.measureText),\n/* harmony export */ \"mergeLibraryItems\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.mergeLibraryItems),\n/* harmony export */ \"mermaidToExcalidraw\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.mermaidToExcalidraw),\n/* harmony export */ \"mutateElement\": () => (/* reexport safe */ _element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement),\n/* harmony export */ \"newElementWith\": () => (/* reexport safe */ _element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith),\n/* harmony export */ \"normalizeLink\": () => (/* reexport safe */ _data_url__WEBPACK_IMPORTED_MODULE_25__.normalizeLink),\n/* harmony export */ \"parseLibraryTokensFromUrl\": () => (/* reexport safe */ _data_library__WEBPACK_IMPORTED_MODULE_20__.parseLibraryTokensFromUrl),\n/* harmony export */ \"restore\": () => (/* reexport safe */ _data_restore__WEBPACK_IMPORTED_MODULE_16__.restore),\n/* harmony export */ \"restoreAppState\": () => (/* reexport safe */ _data_restore__WEBPACK_IMPORTED_MODULE_16__.restoreAppState),\n/* harmony export */ \"restoreElements\": () => (/* reexport safe */ _data_restore__WEBPACK_IMPORTED_MODULE_16__.restoreElements),\n/* harmony export */ \"restoreLibraryItems\": () => (/* reexport safe */ _data_restore__WEBPACK_IMPORTED_MODULE_16__.restoreLibraryItems),\n/* harmony export */ \"sceneCoordsToViewportCoords\": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_4__.sceneCoordsToViewportCoords),\n/* harmony export */ \"serializeAsJSON\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.serializeAsJSON),\n/* harmony export */ \"serializeLibraryAsJSON\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.serializeLibraryAsJSON),\n/* harmony export */ \"useDevice\": () => (/* reexport safe */ _components_App__WEBPACK_IMPORTED_MODULE_3__.useDevice),\n/* harmony export */ \"useHandleLibrary\": () => (/* reexport safe */ _data_library__WEBPACK_IMPORTED_MODULE_20__.useHandleLibrary),\n/* harmony export */ \"useI18n\": () => (/* reexport safe */ _i18n__WEBPACK_IMPORTED_MODULE_7__.useI18n),\n/* harmony export */ \"viewportCoordsToSceneCoords\": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_4__.viewportCoordsToSceneCoords),\n/* harmony export */ \"wrapText\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.wrapText)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _components_InitializeApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../components/InitializeApp */ \"../../components/InitializeApp.tsx\");\n/* harmony import */ var _components_App__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/App */ \"../../components/App.tsx\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"../../utils.ts\");\n/* harmony import */ var _css_app_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../css/app.scss */ \"../../css/app.scss\");\n/* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../css/styles.scss */ \"../../css/styles.scss\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants */ \"../../constants.ts\");\n/* harmony import */ var jotai__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! jotai */ \"../../../node_modules/jotai/esm/index.mjs\");\n/* harmony import */ var _jotai__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../jotai */ \"../../jotai.ts\");\n/* harmony import */ var _components_footer_FooterCenter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/footer/FooterCenter */ \"../../components/footer/FooterCenter.tsx\");\n/* harmony import */ var _components_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/main-menu/MainMenu */ \"../../components/main-menu/MainMenu.tsx\");\n/* harmony import */ var _components_welcome_screen_WelcomeScreen__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/welcome-screen/WelcomeScreen */ \"../../components/welcome-screen/WelcomeScreen.tsx\");\n/* harmony import */ var _components_live_collaboration_LiveCollaborationTrigger__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/live-collaboration/LiveCollaborationTrigger */ \"../../components/live-collaboration/LiveCollaborationTrigger.tsx\");\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../element */ \"../../element/index.ts\");\n/* harmony import */ var _data_restore__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../data/restore */ \"../../data/restore.ts\");\n/* harmony import */ var _packages_utils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../packages/utils */ \"../utils.ts\");\n/* harmony import */ var _element_typeChecks__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../element/typeChecks */ \"../../element/typeChecks.ts\");\n/* harmony import */ var _element_mutateElement__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../element/mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _data_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../data/library */ \"../../data/library.ts\");\n/* harmony import */ var _element_embeddable__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../element/embeddable */ \"../../element/embeddable.ts\");\n/* harmony import */ var _components_Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/Sidebar/Sidebar */ \"../../components/Sidebar/Sidebar.tsx\");\n/* harmony import */ var _components_Button__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/Button */ \"../../components/Button.tsx\");\n/* harmony import */ var _components_DefaultSidebar__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/DefaultSidebar */ \"../../components/DefaultSidebar.tsx\");\n/* harmony import */ var _data_url__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../data/url */ \"../../data/url.ts\");\n/* harmony import */ var _data_transform__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../data/transform */ \"../../data/transform.ts\");\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst ExcalidrawBase = props => {\n var _a, _b, _c;\n\n const {\n onChange,\n initialData,\n excalidrawRef,\n isCollaborating = false,\n onPointerUpdate,\n renderTopRightUI,\n langCode = _i18n__WEBPACK_IMPORTED_MODULE_7__.defaultLang.code,\n viewModeEnabled,\n zenModeEnabled,\n gridModeEnabled,\n initState,\n //zsviczian\n libraryReturnUrl,\n theme,\n name,\n renderCustomStats,\n onPaste,\n onDrop,\n //zsviczian\n detectScroll = true,\n handleKeyboardGlobally = false,\n onLibraryChange,\n autoFocus = false,\n onBeforeTextEdit,\n //zsviczian\n onBeforeTextSubmit,\n //zsviczian\n generateIdForFile,\n onThemeChange,\n //zsviczian\n onLinkOpen,\n onLinkHover,\n //zsviczian\n onViewModeChange,\n //zsviczian\n onPointerDown,\n onScrollChange,\n children,\n validateEmbeddable,\n renderEmbeddable,\n renderWebview,\n //zsviczian\n renderEmbeddableMenu //zsviczian\n\n } = props;\n const canvasActions = (_a = props.UIOptions) === null || _a === void 0 ? void 0 : _a.canvasActions; // FIXME normalize/set defaults in parent component so that the memo resolver\n // compares the same values\n\n const UIOptions = Object.assign(Object.assign({}, props.UIOptions), {\n canvasActions: Object.assign(Object.assign({}, _constants__WEBPACK_IMPORTED_MODULE_8__.DEFAULT_UI_OPTIONS.canvasActions), canvasActions)\n });\n\n if (canvasActions === null || canvasActions === void 0 ? void 0 : canvasActions.export) {\n UIOptions.canvasActions.export.saveFileToDisk = (_c = (_b = canvasActions.export) === null || _b === void 0 ? void 0 : _b.saveFileToDisk) !== null && _c !== void 0 ? _c : _constants__WEBPACK_IMPORTED_MODULE_8__.DEFAULT_UI_OPTIONS.canvasActions[\"export\"].saveFileToDisk;\n }\n\n if (UIOptions.canvasActions.toggleTheme === null && typeof theme === \"undefined\") {\n UIOptions.canvasActions.toggleTheme = true;\n }\n\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {\n // Block pinch-zooming on iOS outside of the content area\n const handleTouchMove = event => {\n // @ts-ignore\n if (typeof event.scale === \"number\" && event.scale !== 1) {\n event.preventDefault();\n }\n };\n\n document.addEventListener(\"touchmove\", handleTouchMove, {\n passive: false\n });\n return () => {\n document.removeEventListener(\"touchmove\", handleTouchMove);\n };\n }, []);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(jotai__WEBPACK_IMPORTED_MODULE_14__.Provider, Object.assign({\n unstable_createStore: () => _jotai__WEBPACK_IMPORTED_MODULE_9__.jotaiStore,\n scope: _jotai__WEBPACK_IMPORTED_MODULE_9__.jotaiScope\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_InitializeApp__WEBPACK_IMPORTED_MODULE_2__.InitializeApp, Object.assign({\n langCode: langCode,\n theme: theme\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_App__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object.assign({\n onChange: onChange,\n initialData: initialData,\n excalidrawRef: excalidrawRef,\n isCollaborating: isCollaborating,\n onPointerUpdate: onPointerUpdate,\n renderTopRightUI: renderTopRightUI,\n langCode: langCode,\n viewModeEnabled: viewModeEnabled,\n zenModeEnabled: zenModeEnabled,\n gridModeEnabled: gridModeEnabled,\n initState: initState,\n libraryReturnUrl: libraryReturnUrl,\n theme: theme,\n name: name,\n renderCustomStats: renderCustomStats,\n UIOptions: UIOptions,\n onPaste: onPaste,\n onDrop: onDrop,\n detectScroll: detectScroll,\n handleKeyboardGlobally: handleKeyboardGlobally,\n onLibraryChange: onLibraryChange,\n autoFocus: autoFocus,\n onBeforeTextEdit: onBeforeTextEdit,\n onBeforeTextSubmit: onBeforeTextSubmit,\n generateIdForFile: generateIdForFile,\n onThemeChange: onThemeChange,\n onLinkOpen: onLinkOpen,\n onLinkHover: onLinkHover,\n onViewModeChange: onViewModeChange,\n onPointerDown: onPointerDown,\n onScrollChange: onScrollChange,\n validateEmbeddable: validateEmbeddable,\n renderEmbeddable: renderEmbeddable,\n renderWebview: renderWebview,\n renderEmbeddableMenu: renderEmbeddableMenu\n }, {\n children: children\n }))\n }))\n }));\n};\n\nconst areEqual = (prevProps, nextProps) => {\n // short-circuit early\n if (prevProps.children !== nextProps.children) {\n return false;\n }\n\n const {\n initialData: prevInitialData,\n UIOptions: prevUIOptions = {}\n } = prevProps,\n prev = __rest(prevProps, [\"initialData\", \"UIOptions\"]);\n\n const {\n initialData: nextInitialData,\n UIOptions: nextUIOptions = {}\n } = nextProps,\n next = __rest(nextProps, [\"initialData\", \"UIOptions\"]); // comparing UIOptions\n\n\n const prevUIOptionsKeys = Object.keys(prevUIOptions);\n const nextUIOptionsKeys = Object.keys(nextUIOptions);\n\n if (prevUIOptionsKeys.length !== nextUIOptionsKeys.length) {\n return false;\n }\n\n const isUIOptionsSame = prevUIOptionsKeys.every(key => {\n if (key === \"canvasActions\") {\n const canvasOptionKeys = Object.keys(prevUIOptions.canvasActions);\n return canvasOptionKeys.every(key => {\n var _a, _b, _c, _d;\n\n if (key === \"export\" && ((_a = prevUIOptions === null || prevUIOptions === void 0 ? void 0 : prevUIOptions.canvasActions) === null || _a === void 0 ? void 0 : _a.export) && ((_b = nextUIOptions === null || nextUIOptions === void 0 ? void 0 : nextUIOptions.canvasActions) === null || _b === void 0 ? void 0 : _b.export)) {\n return prevUIOptions.canvasActions.export.saveFileToDisk === nextUIOptions.canvasActions.export.saveFileToDisk;\n }\n\n return ((_c = prevUIOptions === null || prevUIOptions === void 0 ? void 0 : prevUIOptions.canvasActions) === null || _c === void 0 ? void 0 : _c[key]) === ((_d = nextUIOptions === null || nextUIOptions === void 0 ? void 0 : nextUIOptions.canvasActions) === null || _d === void 0 ? void 0 : _d[key]);\n });\n }\n\n return prevUIOptions[key] === nextUIOptions[key];\n });\n return isUIOptionsSame && (0,_utils__WEBPACK_IMPORTED_MODULE_4__.isShallowEqual)(prev, next);\n};\n\nconst forwardedRefComp = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, ref) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ExcalidrawBase, Object.assign({}, props, {\n excalidrawRef: ref\n})));\nconst Excalidraw = react__WEBPACK_IMPORTED_MODULE_1___default().memo(forwardedRefComp, areEqual);\nExcalidraw.displayName = \"Excalidraw\";\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://ExcalidrawLib/./index.tsx?");
4077
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Button\": () => (/* reexport safe */ _components_Button__WEBPACK_IMPORTED_MODULE_23__.Button),\n/* harmony export */ \"DefaultSidebar\": () => (/* reexport safe */ _components_DefaultSidebar__WEBPACK_IMPORTED_MODULE_24__.DefaultSidebar),\n/* harmony export */ \"Excalidraw\": () => (/* binding */ Excalidraw),\n/* harmony export */ \"FONT_FAMILY\": () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_8__.FONT_FAMILY),\n/* harmony export */ \"Footer\": () => (/* reexport safe */ _components_footer_FooterCenter__WEBPACK_IMPORTED_MODULE_10__[\"default\"]),\n/* harmony export */ \"LiveCollaborationTrigger\": () => (/* reexport safe */ _components_live_collaboration_LiveCollaborationTrigger__WEBPACK_IMPORTED_MODULE_13__[\"default\"]),\n/* harmony export */ \"MIME_TYPES\": () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_8__.MIME_TYPES),\n/* harmony export */ \"MainMenu\": () => (/* reexport safe */ _components_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_11__[\"default\"]),\n/* harmony export */ \"Sidebar\": () => (/* reexport safe */ _components_Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_22__.Sidebar),\n/* harmony export */ \"THEME\": () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_8__.THEME),\n/* harmony export */ \"WelcomeScreen\": () => (/* reexport safe */ _components_welcome_screen_WelcomeScreen__WEBPACK_IMPORTED_MODULE_12__[\"default\"]),\n/* harmony export */ \"bumpVersion\": () => (/* reexport safe */ _element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.bumpVersion),\n/* harmony export */ \"convertToExcalidrawElements\": () => (/* reexport safe */ _data_transform__WEBPACK_IMPORTED_MODULE_26__.convertToExcalidrawElements),\n/* harmony export */ \"defaultLang\": () => (/* reexport safe */ _i18n__WEBPACK_IMPORTED_MODULE_7__.defaultLang),\n/* harmony export */ \"determineFocusDistance\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.determineFocusDistance),\n/* harmony export */ \"exportToBlob\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.exportToBlob),\n/* harmony export */ \"exportToCanvas\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.exportToCanvas),\n/* harmony export */ \"exportToClipboard\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.exportToClipboard),\n/* harmony export */ \"exportToSvg\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.exportToSvg),\n/* harmony export */ \"getBoundTextMaxWidth\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.getBoundTextMaxWidth),\n/* harmony export */ \"getCommonBoundingBox\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.getCommonBoundingBox),\n/* harmony export */ \"getDefaultLineHeight\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.getDefaultLineHeight),\n/* harmony export */ \"getEmbedLink\": () => (/* reexport safe */ _element_embeddable__WEBPACK_IMPORTED_MODULE_21__.getEmbedLink),\n/* harmony export */ \"getFontString\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.getFontString),\n/* harmony export */ \"getFreeDrawSvgPath\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.getFreeDrawSvgPath),\n/* harmony export */ \"getMaximumGroups\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.getMaximumGroups),\n/* harmony export */ \"getNonDeletedElements\": () => (/* reexport safe */ _element__WEBPACK_IMPORTED_MODULE_15__.getNonDeletedElements),\n/* harmony export */ \"getSceneVersion\": () => (/* reexport safe */ _element__WEBPACK_IMPORTED_MODULE_15__.getSceneVersion),\n/* harmony export */ \"intersectElementWithLine\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.intersectElementWithLine),\n/* harmony export */ \"isInvisiblySmallElement\": () => (/* reexport safe */ _element__WEBPACK_IMPORTED_MODULE_15__.isInvisiblySmallElement),\n/* harmony export */ \"isLinearElement\": () => (/* reexport safe */ _element_typeChecks__WEBPACK_IMPORTED_MODULE_18__.isLinearElement),\n/* harmony export */ \"languages\": () => (/* reexport safe */ _i18n__WEBPACK_IMPORTED_MODULE_7__.languages),\n/* harmony export */ \"loadFromBlob\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.loadFromBlob),\n/* harmony export */ \"loadLibraryFromBlob\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.loadLibraryFromBlob),\n/* harmony export */ \"loadSceneOrLibraryFromBlob\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.loadSceneOrLibraryFromBlob),\n/* harmony export */ \"measureText\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.measureText),\n/* harmony export */ \"mergeLibraryItems\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.mergeLibraryItems),\n/* harmony export */ \"mermaidToExcalidraw\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.mermaidToExcalidraw),\n/* harmony export */ \"mutateElement\": () => (/* reexport safe */ _element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.mutateElement),\n/* harmony export */ \"newElementWith\": () => (/* reexport safe */ _element_mutateElement__WEBPACK_IMPORTED_MODULE_19__.newElementWith),\n/* harmony export */ \"normalizeLink\": () => (/* reexport safe */ _data_url__WEBPACK_IMPORTED_MODULE_25__.normalizeLink),\n/* harmony export */ \"parseLibraryTokensFromUrl\": () => (/* reexport safe */ _data_library__WEBPACK_IMPORTED_MODULE_20__.parseLibraryTokensFromUrl),\n/* harmony export */ \"restore\": () => (/* reexport safe */ _data_restore__WEBPACK_IMPORTED_MODULE_16__.restore),\n/* harmony export */ \"restoreAppState\": () => (/* reexport safe */ _data_restore__WEBPACK_IMPORTED_MODULE_16__.restoreAppState),\n/* harmony export */ \"restoreElements\": () => (/* reexport safe */ _data_restore__WEBPACK_IMPORTED_MODULE_16__.restoreElements),\n/* harmony export */ \"restoreLibraryItems\": () => (/* reexport safe */ _data_restore__WEBPACK_IMPORTED_MODULE_16__.restoreLibraryItems),\n/* harmony export */ \"sceneCoordsToViewportCoords\": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_4__.sceneCoordsToViewportCoords),\n/* harmony export */ \"serializeAsJSON\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.serializeAsJSON),\n/* harmony export */ \"serializeLibraryAsJSON\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.serializeLibraryAsJSON),\n/* harmony export */ \"useDevice\": () => (/* reexport safe */ _components_App__WEBPACK_IMPORTED_MODULE_3__.useDevice),\n/* harmony export */ \"useHandleLibrary\": () => (/* reexport safe */ _data_library__WEBPACK_IMPORTED_MODULE_20__.useHandleLibrary),\n/* harmony export */ \"useI18n\": () => (/* reexport safe */ _i18n__WEBPACK_IMPORTED_MODULE_7__.useI18n),\n/* harmony export */ \"viewportCoordsToSceneCoords\": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_4__.viewportCoordsToSceneCoords),\n/* harmony export */ \"wrapText\": () => (/* reexport safe */ _packages_utils__WEBPACK_IMPORTED_MODULE_17__.wrapText)\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"../../../node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _components_InitializeApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../components/InitializeApp */ \"../../components/InitializeApp.tsx\");\n/* harmony import */ var _components_App__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/App */ \"../../components/App.tsx\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"../../utils.ts\");\n/* harmony import */ var _css_app_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../css/app.scss */ \"../../css/app.scss\");\n/* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../css/styles.scss */ \"../../css/styles.scss\");\n/* harmony import */ var _i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../i18n */ \"../../i18n.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants */ \"../../constants.ts\");\n/* harmony import */ var jotai__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! jotai */ \"../../../node_modules/jotai/esm/index.mjs\");\n/* harmony import */ var _jotai__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../jotai */ \"../../jotai.ts\");\n/* harmony import */ var _components_footer_FooterCenter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/footer/FooterCenter */ \"../../components/footer/FooterCenter.tsx\");\n/* harmony import */ var _components_main_menu_MainMenu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/main-menu/MainMenu */ \"../../components/main-menu/MainMenu.tsx\");\n/* harmony import */ var _components_welcome_screen_WelcomeScreen__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/welcome-screen/WelcomeScreen */ \"../../components/welcome-screen/WelcomeScreen.tsx\");\n/* harmony import */ var _components_live_collaboration_LiveCollaborationTrigger__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/live-collaboration/LiveCollaborationTrigger */ \"../../components/live-collaboration/LiveCollaborationTrigger.tsx\");\n/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../element */ \"../../element/index.ts\");\n/* harmony import */ var _data_restore__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../data/restore */ \"../../data/restore.ts\");\n/* harmony import */ var _packages_utils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../packages/utils */ \"../utils.ts\");\n/* harmony import */ var _element_typeChecks__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../element/typeChecks */ \"../../element/typeChecks.ts\");\n/* harmony import */ var _element_mutateElement__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../element/mutateElement */ \"../../element/mutateElement.ts\");\n/* harmony import */ var _data_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../data/library */ \"../../data/library.ts\");\n/* harmony import */ var _element_embeddable__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../element/embeddable */ \"../../element/embeddable.ts\");\n/* harmony import */ var _components_Sidebar_Sidebar__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/Sidebar/Sidebar */ \"../../components/Sidebar/Sidebar.tsx\");\n/* harmony import */ var _components_Button__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/Button */ \"../../components/Button.tsx\");\n/* harmony import */ var _components_DefaultSidebar__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/DefaultSidebar */ \"../../components/DefaultSidebar.tsx\");\n/* harmony import */ var _data_url__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../data/url */ \"../../data/url.ts\");\n/* harmony import */ var _data_transform__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../data/transform */ \"../../data/transform.ts\");\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst ExcalidrawBase = props => {\n var _a, _b, _c;\n\n const {\n onChange,\n initialData,\n excalidrawRef,\n isCollaborating = false,\n onPointerUpdate,\n renderTopRightUI,\n langCode = _i18n__WEBPACK_IMPORTED_MODULE_7__.defaultLang.code,\n viewModeEnabled,\n zenModeEnabled,\n gridModeEnabled,\n initState,\n //zsviczian\n libraryReturnUrl,\n theme,\n name,\n renderCustomStats,\n onPaste,\n onDrop,\n //zsviczian\n detectScroll = true,\n handleKeyboardGlobally = false,\n onLibraryChange,\n autoFocus = false,\n onBeforeTextEdit,\n //zsviczian\n onBeforeTextSubmit,\n //zsviczian\n generateIdForFile,\n onThemeChange,\n //zsviczian\n onLinkOpen,\n onLinkHover,\n //zsviczian\n onViewModeChange,\n //zsviczian\n onPointerDown,\n onScrollChange,\n children,\n validateEmbeddable,\n renderEmbeddable,\n renderWebview,\n //zsviczian\n renderEmbeddableMenu,\n //zsviczian\n renderMermaid //zsviczian\n\n } = props;\n const canvasActions = (_a = props.UIOptions) === null || _a === void 0 ? void 0 : _a.canvasActions; // FIXME normalize/set defaults in parent component so that the memo resolver\n // compares the same values\n\n const UIOptions = Object.assign(Object.assign({}, props.UIOptions), {\n canvasActions: Object.assign(Object.assign({}, _constants__WEBPACK_IMPORTED_MODULE_8__.DEFAULT_UI_OPTIONS.canvasActions), canvasActions)\n });\n\n if (canvasActions === null || canvasActions === void 0 ? void 0 : canvasActions.export) {\n UIOptions.canvasActions.export.saveFileToDisk = (_c = (_b = canvasActions.export) === null || _b === void 0 ? void 0 : _b.saveFileToDisk) !== null && _c !== void 0 ? _c : _constants__WEBPACK_IMPORTED_MODULE_8__.DEFAULT_UI_OPTIONS.canvasActions[\"export\"].saveFileToDisk;\n }\n\n if (UIOptions.canvasActions.toggleTheme === null && typeof theme === \"undefined\") {\n UIOptions.canvasActions.toggleTheme = true;\n }\n\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {\n // Block pinch-zooming on iOS outside of the content area\n const handleTouchMove = event => {\n // @ts-ignore\n if (typeof event.scale === \"number\" && event.scale !== 1) {\n event.preventDefault();\n }\n };\n\n document.addEventListener(\"touchmove\", handleTouchMove, {\n passive: false\n });\n return () => {\n document.removeEventListener(\"touchmove\", handleTouchMove);\n };\n }, []);\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(jotai__WEBPACK_IMPORTED_MODULE_14__.Provider, Object.assign({\n unstable_createStore: () => _jotai__WEBPACK_IMPORTED_MODULE_9__.jotaiStore,\n scope: _jotai__WEBPACK_IMPORTED_MODULE_9__.jotaiScope\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_InitializeApp__WEBPACK_IMPORTED_MODULE_2__.InitializeApp, Object.assign({\n langCode: langCode,\n theme: theme\n }, {\n children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_App__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object.assign({\n onChange: onChange,\n initialData: initialData,\n excalidrawRef: excalidrawRef,\n isCollaborating: isCollaborating,\n onPointerUpdate: onPointerUpdate,\n renderTopRightUI: renderTopRightUI,\n langCode: langCode,\n viewModeEnabled: viewModeEnabled,\n zenModeEnabled: zenModeEnabled,\n gridModeEnabled: gridModeEnabled,\n initState: initState,\n libraryReturnUrl: libraryReturnUrl,\n theme: theme,\n name: name,\n renderCustomStats: renderCustomStats,\n UIOptions: UIOptions,\n onPaste: onPaste,\n onDrop: onDrop,\n detectScroll: detectScroll,\n handleKeyboardGlobally: handleKeyboardGlobally,\n onLibraryChange: onLibraryChange,\n autoFocus: autoFocus,\n onBeforeTextEdit: onBeforeTextEdit,\n onBeforeTextSubmit: onBeforeTextSubmit,\n generateIdForFile: generateIdForFile,\n onThemeChange: onThemeChange,\n onLinkOpen: onLinkOpen,\n onLinkHover: onLinkHover,\n onViewModeChange: onViewModeChange,\n onPointerDown: onPointerDown,\n onScrollChange: onScrollChange,\n validateEmbeddable: validateEmbeddable,\n renderEmbeddable: renderEmbeddable,\n renderWebview: renderWebview,\n renderEmbeddableMenu: renderEmbeddableMenu,\n renderMermaid: renderMermaid\n }, {\n children: children\n }))\n }))\n }));\n};\n\nconst areEqual = (prevProps, nextProps) => {\n // short-circuit early\n if (prevProps.children !== nextProps.children) {\n return false;\n }\n\n const {\n initialData: prevInitialData,\n UIOptions: prevUIOptions = {}\n } = prevProps,\n prev = __rest(prevProps, [\"initialData\", \"UIOptions\"]);\n\n const {\n initialData: nextInitialData,\n UIOptions: nextUIOptions = {}\n } = nextProps,\n next = __rest(nextProps, [\"initialData\", \"UIOptions\"]); // comparing UIOptions\n\n\n const prevUIOptionsKeys = Object.keys(prevUIOptions);\n const nextUIOptionsKeys = Object.keys(nextUIOptions);\n\n if (prevUIOptionsKeys.length !== nextUIOptionsKeys.length) {\n return false;\n }\n\n const isUIOptionsSame = prevUIOptionsKeys.every(key => {\n if (key === \"canvasActions\") {\n const canvasOptionKeys = Object.keys(prevUIOptions.canvasActions);\n return canvasOptionKeys.every(key => {\n var _a, _b, _c, _d;\n\n if (key === \"export\" && ((_a = prevUIOptions === null || prevUIOptions === void 0 ? void 0 : prevUIOptions.canvasActions) === null || _a === void 0 ? void 0 : _a.export) && ((_b = nextUIOptions === null || nextUIOptions === void 0 ? void 0 : nextUIOptions.canvasActions) === null || _b === void 0 ? void 0 : _b.export)) {\n return prevUIOptions.canvasActions.export.saveFileToDisk === nextUIOptions.canvasActions.export.saveFileToDisk;\n }\n\n return ((_c = prevUIOptions === null || prevUIOptions === void 0 ? void 0 : prevUIOptions.canvasActions) === null || _c === void 0 ? void 0 : _c[key]) === ((_d = nextUIOptions === null || nextUIOptions === void 0 ? void 0 : nextUIOptions.canvasActions) === null || _d === void 0 ? void 0 : _d[key]);\n });\n }\n\n return prevUIOptions[key] === nextUIOptions[key];\n });\n return isUIOptionsSame && (0,_utils__WEBPACK_IMPORTED_MODULE_4__.isShallowEqual)(prev, next);\n};\n\nconst forwardedRefComp = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, ref) => (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ExcalidrawBase, Object.assign({}, props, {\n excalidrawRef: ref\n})));\nconst Excalidraw = react__WEBPACK_IMPORTED_MODULE_1___default().memo(forwardedRefComp, areEqual);\nExcalidraw.displayName = \"Excalidraw\";\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://ExcalidrawLib/./index.tsx?");
4023
4078
 
4024
4079
  /***/ }),
4025
4080
 
@@ -4030,7 +4085,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4030
4085
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4031
4086
 
4032
4087
  "use strict";
4033
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constants */ \"../../constants.ts\");\n\n\nif (\"development\" !== _constants__WEBPACK_IMPORTED_MODULE_0__.ENV.TEST) {\n /* eslint-disable */\n\n /* global __webpack_public_path__:writable */\n __webpack_require__.p = window.EXCALIDRAW_ASSET_PATH || `https://unpkg.com/${\"@zsviczian/excalidraw\"}@${\"0.16.1-obsidian-1\"}/dist/`;\n}\n\n//# sourceURL=webpack://ExcalidrawLib/./publicPath.js?");
4088
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../constants */ \"../../constants.ts\");\n\n\nif (\"development\" !== _constants__WEBPACK_IMPORTED_MODULE_0__.ENV.TEST) {\n /* eslint-disable */\n\n /* global __webpack_public_path__:writable */\n __webpack_require__.p = window.EXCALIDRAW_ASSET_PATH || `https://unpkg.com/${\"@zsviczian/excalidraw\"}@${\"0.16.1-obsidian-2\"}/dist/`;\n}\n\n//# sourceURL=webpack://ExcalidrawLib/./publicPath.js?");
4034
4089
 
4035
4090
  /***/ }),
4036
4091
 
@@ -4551,6 +4606,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
4551
4606
 
4552
4607
  /***/ }),
4553
4608
 
4609
+ /***/ "../../components/LaserTool/LaserToolOverlay.scss":
4610
+ /*!********************************************************!*\
4611
+ !*** ../../components/LaserTool/LaserToolOverlay.scss ***!
4612
+ \********************************************************/
4613
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4614
+
4615
+ "use strict";
4616
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _packages_excalidraw_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../packages/excalidraw/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _packages_excalidraw_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../packages/excalidraw/node_modules/style-loader/dist/runtime/styleDomAPI.js */ \"./node_modules/style-loader/dist/runtime/styleDomAPI.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _packages_excalidraw_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../packages/excalidraw/node_modules/style-loader/dist/runtime/insertBySelector.js */ \"./node_modules/style-loader/dist/runtime/insertBySelector.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _packages_excalidraw_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../packages/excalidraw/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _packages_excalidraw_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../packages/excalidraw/node_modules/style-loader/dist/runtime/insertStyleElement.js */ \"./node_modules/style-loader/dist/runtime/insertStyleElement.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _packages_excalidraw_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../packages/excalidraw/node_modules/style-loader/dist/runtime/styleTagTransform.js */ \"./node_modules/style-loader/dist/runtime/styleTagTransform.js\");\n/* harmony import */ var _packages_excalidraw_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_packages_excalidraw_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _packages_excalidraw_node_modules_css_loader_dist_cjs_js_packages_excalidraw_node_modules_postcss_loader_dist_cjs_js_ruleSet_1_rules_0_use_2_packages_excalidraw_node_modules_sass_loader_dist_cjs_js_LaserToolOverlay_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../packages/excalidraw/node_modules/css-loader/dist/cjs.js!../../packages/excalidraw/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!../../packages/excalidraw/node_modules/sass-loader/dist/cjs.js!./LaserToolOverlay.scss */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./node_modules/sass-loader/dist/cjs.js!../../components/LaserTool/LaserToolOverlay.scss\");\n\n \n \n \n \n \n \n \n \n \n\nvar options = {};\n\noptions.styleTagTransform = (_packages_excalidraw_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\noptions.setAttributes = (_packages_excalidraw_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\n\n options.insert = _packages_excalidraw_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \"head\");\n \noptions.domAPI = (_packages_excalidraw_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\noptions.insertStyleElement = (_packages_excalidraw_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\n\nvar update = _packages_excalidraw_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_packages_excalidraw_node_modules_css_loader_dist_cjs_js_packages_excalidraw_node_modules_postcss_loader_dist_cjs_js_ruleSet_1_rules_0_use_2_packages_excalidraw_node_modules_sass_loader_dist_cjs_js_LaserToolOverlay_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"], options);\n\n\n\n\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_packages_excalidraw_node_modules_css_loader_dist_cjs_js_packages_excalidraw_node_modules_postcss_loader_dist_cjs_js_ruleSet_1_rules_0_use_2_packages_excalidraw_node_modules_sass_loader_dist_cjs_js_LaserToolOverlay_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && _packages_excalidraw_node_modules_css_loader_dist_cjs_js_packages_excalidraw_node_modules_postcss_loader_dist_cjs_js_ruleSet_1_rules_0_use_2_packages_excalidraw_node_modules_sass_loader_dist_cjs_js_LaserToolOverlay_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals ? _packages_excalidraw_node_modules_css_loader_dist_cjs_js_packages_excalidraw_node_modules_postcss_loader_dist_cjs_js_ruleSet_1_rules_0_use_2_packages_excalidraw_node_modules_sass_loader_dist_cjs_js_LaserToolOverlay_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals : undefined);\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../components/LaserTool/LaserToolOverlay.scss?");
4617
+
4618
+ /***/ }),
4619
+
4554
4620
  /***/ "../../components/LayerUI.scss":
4555
4621
  /*!*************************************!*\
4556
4622
  !*** ../../components/LayerUI.scss ***!
@@ -5222,6 +5288,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
5222
5288
 
5223
5289
  /***/ }),
5224
5290
 
5291
+ /***/ "../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/obsidianUtil.js":
5292
+ /*!***********************************************************************************!*\
5293
+ !*** ../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/obsidianUtil.js ***!
5294
+ \***********************************************************************************/
5295
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
5296
+
5297
+ "use strict";
5298
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"replaceSVGStyle\": () => (/* binding */ replaceSVGStyle)\n/* harmony export */ });\nconst style = {\n \"flowchart-v2\": `#mermaid-to-excalidraw{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;fill:#333;}#mermaid-to-excalidraw .error-icon{fill:#552222;}#mermaid-to-excalidraw .error-text{fill:#552222;stroke:#552222;}#mermaid-to-excalidraw .edge-thickness-normal{stroke-width:2px;}#mermaid-to-excalidraw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-to-excalidraw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-to-excalidraw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-to-excalidraw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-to-excalidraw .marker{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .marker.cross{stroke:#333333;}#mermaid-to-excalidraw svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;}#mermaid-to-excalidraw .label{font-family:\"trebuchet ms\",verdana,arial,sans-serif;color:#333;}#mermaid-to-excalidraw .cluster-label text{fill:#333;}#mermaid-to-excalidraw .cluster-label span,#mermaid-to-excalidraw p{color:#333;}#mermaid-to-excalidraw .label text,#mermaid-to-excalidraw span,#mermaid-to-excalidraw p{fill:#333;color:#333;}#mermaid-to-excalidraw .node rect,#mermaid-to-excalidraw .node circle,#mermaid-to-excalidraw .node ellipse,#mermaid-to-excalidraw .node polygon,#mermaid-to-excalidraw .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-to-excalidraw .flowchart-label text{text-anchor:middle;}#mermaid-to-excalidraw .node .label{text-align:center;}#mermaid-to-excalidraw .node.clickable{cursor:pointer;}#mermaid-to-excalidraw .arrowheadPath{fill:#333333;}#mermaid-to-excalidraw .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-to-excalidraw .flowchart-link{stroke:#333333;fill:none;}#mermaid-to-excalidraw .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-to-excalidraw .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-to-excalidraw .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-to-excalidraw .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-to-excalidraw .cluster text{fill:#333;}#mermaid-to-excalidraw .cluster span,#mermaid-to-excalidraw p{color:#333;}#mermaid-to-excalidraw div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-to-excalidraw .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-to-excalidraw :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}`,\n \"sequence\": `#mermaid-to-excalidraw{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;fill:#333;}#mermaid-to-excalidraw .error-icon{fill:#552222;}#mermaid-to-excalidraw .error-text{fill:#552222;stroke:#552222;}#mermaid-to-excalidraw .edge-thickness-normal{stroke-width:2px;}#mermaid-to-excalidraw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-to-excalidraw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-to-excalidraw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-to-excalidraw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-to-excalidraw .marker{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .marker.cross{stroke:#333333;}#mermaid-to-excalidraw svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;}#mermaid-to-excalidraw .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-to-excalidraw text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-to-excalidraw .actor-line{stroke:grey;}#mermaid-to-excalidraw .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-to-excalidraw .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-to-excalidraw #arrowhead path{fill:#333;stroke:#333;}#mermaid-to-excalidraw .sequenceNumber{fill:white;}#mermaid-to-excalidraw #sequencenumber{fill:#333;}#mermaid-to-excalidraw #crosshead path{fill:#333;stroke:#333;}#mermaid-to-excalidraw .messageText{fill:#333;stroke:none;}#mermaid-to-excalidraw .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-to-excalidraw .labelText,#mermaid-to-excalidraw .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-to-excalidraw .loopText,#mermaid-to-excalidraw .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-to-excalidraw .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-to-excalidraw .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-to-excalidraw .noteText,#mermaid-to-excalidraw .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-to-excalidraw .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-to-excalidraw .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-to-excalidraw .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-to-excalidraw .actorPopupMenu{position:absolute;}#mermaid-to-excalidraw .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-to-excalidraw .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-to-excalidraw .actor-man circle,#mermaid-to-excalidraw line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-to-excalidraw :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}`,\n \"stateDiagram\": `#mermaid-to-excalidraw{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;fill:#333;}#mermaid-to-excalidraw .error-icon{fill:#552222;}#mermaid-to-excalidraw .error-text{fill:#552222;stroke:#552222;}#mermaid-to-excalidraw .edge-thickness-normal{stroke-width:2px;}#mermaid-to-excalidraw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-to-excalidraw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-to-excalidraw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-to-excalidraw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-to-excalidraw .marker{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .marker.cross{stroke:#333333;}#mermaid-to-excalidraw svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;}#mermaid-to-excalidraw defs #statediagram-barbEnd{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw g.stateGroup text{fill:#9370DB;stroke:none;font-size:10px;}#mermaid-to-excalidraw g.stateGroup text{fill:#333;stroke:none;font-size:10px;}#mermaid-to-excalidraw g.stateGroup .state-title{font-weight:bolder;fill:#131300;}#mermaid-to-excalidraw g.stateGroup rect{fill:#ECECFF;stroke:#9370DB;}#mermaid-to-excalidraw g.stateGroup line{stroke:#333333;stroke-width:1;}#mermaid-to-excalidraw .transition{stroke:#333333;stroke-width:1;fill:none;}#mermaid-to-excalidraw .stateGroup .composit{fill:white;border-bottom:1px;}#mermaid-to-excalidraw .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px;}#mermaid-to-excalidraw .state-note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-to-excalidraw .state-note text{fill:black;stroke:none;font-size:10px;}#mermaid-to-excalidraw .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5;}#mermaid-to-excalidraw .edgeLabel .label rect{fill:#ECECFF;opacity:0.5;}#mermaid-to-excalidraw .edgeLabel .label text{fill:#333;}#mermaid-to-excalidraw .label div .edgeLabel{color:#333;}#mermaid-to-excalidraw .stateLabel text{fill:#131300;font-size:10px;font-weight:bold;}#mermaid-to-excalidraw .node circle.state-start{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .node .fork-join{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .node circle.state-end{fill:#9370DB;stroke:white;stroke-width:1.5;}#mermaid-to-excalidraw .end-state-inner{fill:white;stroke-width:1.5;}#mermaid-to-excalidraw .node rect{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-to-excalidraw .node polygon{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-to-excalidraw #statediagram-barbEnd{fill:#333333;}#mermaid-to-excalidraw .statediagram-cluster rect{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-to-excalidraw .cluster-label,#mermaid-to-excalidraw .nodeLabel{color:#131300;}#mermaid-to-excalidraw .statediagram-cluster rect.outer{rx:5px;ry:5px;}#mermaid-to-excalidraw .statediagram-state .divider{stroke:#9370DB;}#mermaid-to-excalidraw .statediagram-state .title-state{rx:5px;ry:5px;}#mermaid-to-excalidraw .statediagram-cluster.statediagram-cluster .inner{fill:white;}#mermaid-to-excalidraw .statediagram-cluster.statediagram-cluster-alt .inner{fill:#f0f0f0;}#mermaid-to-excalidraw .statediagram-cluster .inner{rx:0;ry:0;}#mermaid-to-excalidraw .statediagram-state rect.basic{rx:5px;ry:5px;}#mermaid-to-excalidraw .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#f0f0f0;}#mermaid-to-excalidraw .note-edge{stroke-dasharray:5;}#mermaid-to-excalidraw .statediagram-note rect{fill:#fff5ad;stroke:#aaaa33;stroke-width:1px;rx:0;ry:0;}#mermaid-to-excalidraw .statediagram-note rect{fill:#fff5ad;stroke:#aaaa33;stroke-width:1px;rx:0;ry:0;}#mermaid-to-excalidraw .statediagram-note text{fill:black;}#mermaid-to-excalidraw .statediagram-note .nodeLabel{color:black;}#mermaid-to-excalidraw .statediagram .edgeLabel{color:red;}#mermaid-to-excalidraw #dependencyStart,#mermaid-to-excalidraw #dependencyEnd{fill:#333333;stroke:#333333;stroke-width:1;}#mermaid-to-excalidraw .statediagramTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-to-excalidraw :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}`,\n \"er\": `#mermaid-to-excalidraw{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;fill:#333;}#mermaid-to-excalidraw .error-icon{fill:#552222;}#mermaid-to-excalidraw .error-text{fill:#552222;stroke:#552222;}#mermaid-to-excalidraw .edge-thickness-normal{stroke-width:2px;}#mermaid-to-excalidraw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-to-excalidraw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-to-excalidraw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-to-excalidraw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-to-excalidraw .marker{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .marker.cross{stroke:#333333;}#mermaid-to-excalidraw svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;}#mermaid-to-excalidraw .entityBox{fill:#ECECFF;stroke:#9370DB;}#mermaid-to-excalidraw .attributeBoxOdd{fill:#ffffff;stroke:#9370DB;}#mermaid-to-excalidraw .attributeBoxEven{fill:#f2f2f2;stroke:#9370DB;}#mermaid-to-excalidraw .relationshipLabelBox{fill:hsl(80, 100%, 96.2745098039%);opacity:0.7;background-color:hsl(80, 100%, 96.2745098039%);}#mermaid-to-excalidraw .relationshipLabelBox rect{opacity:0.5;}#mermaid-to-excalidraw .relationshipLine{stroke:#333333;}#mermaid-to-excalidraw .entityTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-to-excalidraw #MD_PARENT_START{fill:#f5f5f5!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #MD_PARENT_END{fill:#f5f5f5!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}`,\n \"gantt\": `#mermaid-to-excalidraw{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;fill:#333;}#mermaid-to-excalidraw .error-icon{fill:#552222;}#mermaid-to-excalidraw .error-text{fill:#552222;stroke:#552222;}#mermaid-to-excalidraw .edge-thickness-normal{stroke-width:2px;}#mermaid-to-excalidraw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-to-excalidraw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-to-excalidraw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-to-excalidraw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-to-excalidraw .marker{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .marker.cross{stroke:#333333;}#mermaid-to-excalidraw svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;}#mermaid-to-excalidraw .mermaid-main-font{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-family:var(--mermaid-font-family);}#mermaid-to-excalidraw .exclude-range{fill:#eeeeee;}#mermaid-to-excalidraw .section{stroke:none;opacity:0.2;}#mermaid-to-excalidraw .section0{fill:rgba(102, 102, 255, 0.49);}#mermaid-to-excalidraw .section2{fill:#fff400;}#mermaid-to-excalidraw .section1,#mermaid-to-excalidraw .section3{fill:white;opacity:0.2;}#mermaid-to-excalidraw .sectionTitle0{fill:#333;}#mermaid-to-excalidraw .sectionTitle1{fill:#333;}#mermaid-to-excalidraw .sectionTitle2{fill:#333;}#mermaid-to-excalidraw .sectionTitle3{fill:#333;}#mermaid-to-excalidraw .sectionTitle{text-anchor:start;font-family:'trebuchet ms',verdana,arial,sans-serif;font-family:var(--mermaid-font-family);}#mermaid-to-excalidraw .grid .tick{stroke:lightgrey;opacity:0.8;shape-rendering:crispEdges;}#mermaid-to-excalidraw .grid .tick text{font-family:\"trebuchet ms\",verdana,arial,sans-serif;fill:#333;}#mermaid-to-excalidraw .grid path{stroke-width:0;}#mermaid-to-excalidraw .today{fill:none;stroke:red;stroke-width:2px;}#mermaid-to-excalidraw .task{stroke-width:2;}#mermaid-to-excalidraw .taskText{text-anchor:middle;font-family:'trebuchet ms',verdana,arial,sans-serif;font-family:var(--mermaid-font-family);}#mermaid-to-excalidraw .taskTextOutsideRight{fill:black;text-anchor:start;font-family:'trebuchet ms',verdana,arial,sans-serif;font-family:var(--mermaid-font-family);}#mermaid-to-excalidraw .taskTextOutsideLeft{fill:black;text-anchor:end;}#mermaid-to-excalidraw .task.clickable{cursor:pointer;}#mermaid-to-excalidraw .taskText.clickable{cursor:pointer;fill:#003163!important;font-weight:bold;}#mermaid-to-excalidraw .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163!important;font-weight:bold;}#mermaid-to-excalidraw .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163!important;font-weight:bold;}#mermaid-to-excalidraw .taskText0,#mermaid-to-excalidraw .taskText1,#mermaid-to-excalidraw .taskText2,#mermaid-to-excalidraw .taskText3{fill:white;}#mermaid-to-excalidraw .task0,#mermaid-to-excalidraw .task1,#mermaid-to-excalidraw .task2,#mermaid-to-excalidraw .task3{fill:#8a90dd;stroke:#534fbc;}#mermaid-to-excalidraw .taskTextOutside0,#mermaid-to-excalidraw .taskTextOutside2{fill:black;}#mermaid-to-excalidraw .taskTextOutside1,#mermaid-to-excalidraw .taskTextOutside3{fill:black;}#mermaid-to-excalidraw .active0,#mermaid-to-excalidraw .active1,#mermaid-to-excalidraw .active2,#mermaid-to-excalidraw .active3{fill:#bfc7ff;stroke:#534fbc;}#mermaid-to-excalidraw .activeText0,#mermaid-to-excalidraw .activeText1,#mermaid-to-excalidraw .activeText2,#mermaid-to-excalidraw .activeText3{fill:black!important;}#mermaid-to-excalidraw .done0,#mermaid-to-excalidraw .done1,#mermaid-to-excalidraw .done2,#mermaid-to-excalidraw .done3{stroke:grey;fill:lightgrey;stroke-width:2;}#mermaid-to-excalidraw .doneText0,#mermaid-to-excalidraw .doneText1,#mermaid-to-excalidraw .doneText2,#mermaid-to-excalidraw .doneText3{fill:black!important;}#mermaid-to-excalidraw .crit0,#mermaid-to-excalidraw .crit1,#mermaid-to-excalidraw .crit2,#mermaid-to-excalidraw .crit3{stroke:#ff8888;fill:red;stroke-width:2;}#mermaid-to-excalidraw .activeCrit0,#mermaid-to-excalidraw .activeCrit1,#mermaid-to-excalidraw .activeCrit2,#mermaid-to-excalidraw .activeCrit3{stroke:#ff8888;fill:#bfc7ff;stroke-width:2;}#mermaid-to-excalidraw .doneCrit0,#mermaid-to-excalidraw .doneCrit1,#mermaid-to-excalidraw .doneCrit2,#mermaid-to-excalidraw .doneCrit3{stroke:#ff8888;fill:lightgrey;stroke-width:2;cursor:pointer;shape-rendering:crispEdges;}#mermaid-to-excalidraw .milestone{transform:rotate(45deg) scale(0.8,0.8);}#mermaid-to-excalidraw .milestoneText{font-style:italic;}#mermaid-to-excalidraw .doneCritText0,#mermaid-to-excalidraw .doneCritText1,#mermaid-to-excalidraw .doneCritText2,#mermaid-to-excalidraw .doneCritText3{fill:black!important;}#mermaid-to-excalidraw .activeCritText0,#mermaid-to-excalidraw .activeCritText1,#mermaid-to-excalidraw .activeCritText2,#mermaid-to-excalidraw .activeCritText3{fill:black!important;}#mermaid-to-excalidraw .titleText{text-anchor:middle;font-size:18px;fill:#333;font-family:'trebuchet ms',verdana,arial,sans-serif;font-family:var(--mermaid-font-family);}#mermaid-to-excalidraw :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}`,\n \"journey\": `#mermaid-to-excalidraw{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;fill:#333;}#mermaid-to-excalidraw .error-icon{fill:#552222;}#mermaid-to-excalidraw .error-text{fill:#552222;stroke:#552222;}#mermaid-to-excalidraw .edge-thickness-normal{stroke-width:2px;}#mermaid-to-excalidraw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-to-excalidraw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-to-excalidraw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-to-excalidraw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-to-excalidraw .marker{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .marker.cross{stroke:#333333;}#mermaid-to-excalidraw svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;}#mermaid-to-excalidraw .label{font-family:'trebuchet ms',verdana,arial,sans-serif;font-family:var(--mermaid-font-family);color:#333;}#mermaid-to-excalidraw .mouth{stroke:#666;}#mermaid-to-excalidraw line{stroke:#333;}#mermaid-to-excalidraw .legend{fill:#333;}#mermaid-to-excalidraw .label text{fill:#333;}#mermaid-to-excalidraw .label{color:#333;}#mermaid-to-excalidraw .face{fill:#FFF8DC;stroke:#999;}#mermaid-to-excalidraw .node rect,#mermaid-to-excalidraw .node circle,#mermaid-to-excalidraw .node ellipse,#mermaid-to-excalidraw .node polygon,#mermaid-to-excalidraw .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-to-excalidraw .node .label{text-align:center;}#mermaid-to-excalidraw .node.clickable{cursor:pointer;}#mermaid-to-excalidraw .arrowheadPath{fill:#333333;}#mermaid-to-excalidraw .edgePath .path{stroke:#333333;stroke-width:1.5px;}#mermaid-to-excalidraw .flowchart-link{stroke:#333333;fill:none;}#mermaid-to-excalidraw .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-to-excalidraw .edgeLabel rect{opacity:0.5;}#mermaid-to-excalidraw .cluster text{fill:#333;}#mermaid-to-excalidraw div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms',verdana,arial,sans-serif;font-family:var(--mermaid-font-family);font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-to-excalidraw .task-type-0,#mermaid-to-excalidraw .section-type-0{fill:#ECECFF;}#mermaid-to-excalidraw .task-type-1,#mermaid-to-excalidraw .section-type-1{fill:#ffffde;}#mermaid-to-excalidraw .task-type-2,#mermaid-to-excalidraw .section-type-2{fill:hsl(304, 100%, 96.2745098039%);}#mermaid-to-excalidraw .task-type-3,#mermaid-to-excalidraw .section-type-3{fill:hsl(124, 100%, 93.5294117647%);}#mermaid-to-excalidraw .task-type-4,#mermaid-to-excalidraw .section-type-4{fill:hsl(176, 100%, 96.2745098039%);}#mermaid-to-excalidraw .task-type-5,#mermaid-to-excalidraw .section-type-5{fill:hsl(-4, 100%, 93.5294117647%);}#mermaid-to-excalidraw .task-type-6,#mermaid-to-excalidraw .section-type-6{fill:hsl(8, 100%, 96.2745098039%);}#mermaid-to-excalidraw .task-type-7,#mermaid-to-excalidraw .section-type-7{fill:hsl(188, 100%, 93.5294117647%);}#mermaid-to-excalidraw :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}`,\n \"gitGraph\": `#mermaid-to-excalidraw{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;fill:#333;}#mermaid-to-excalidraw .error-icon{fill:#552222;}#mermaid-to-excalidraw .error-text{fill:#552222;stroke:#552222;}#mermaid-to-excalidraw .edge-thickness-normal{stroke-width:2px;}#mermaid-to-excalidraw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-to-excalidraw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-to-excalidraw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-to-excalidraw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-to-excalidraw .marker{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .marker.cross{stroke:#333333;}#mermaid-to-excalidraw svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;}#mermaid-to-excalidraw .commit-id,#mermaid-to-excalidraw .commit-msg,#mermaid-to-excalidraw .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms',verdana,arial,sans-serif;font-family:var(--mermaid-font-family);}#mermaid-to-excalidraw .branch-label0{fill:#ffffff;}#mermaid-to-excalidraw .commit0{stroke:hsl(240, 100%, 46.2745098039%);fill:hsl(240, 100%, 46.2745098039%);}#mermaid-to-excalidraw .commit-highlight0{stroke:hsl(60, 100%, 3.7254901961%);fill:hsl(60, 100%, 3.7254901961%);}#mermaid-to-excalidraw .label0{fill:hsl(240, 100%, 46.2745098039%);}#mermaid-to-excalidraw .arrow0{stroke:hsl(240, 100%, 46.2745098039%);}#mermaid-to-excalidraw .branch-label1{fill:black;}#mermaid-to-excalidraw .commit1{stroke:hsl(60, 100%, 43.5294117647%);fill:hsl(60, 100%, 43.5294117647%);}#mermaid-to-excalidraw .commit-highlight1{stroke:rgb(0, 0, 160.5);fill:rgb(0, 0, 160.5);}#mermaid-to-excalidraw .label1{fill:hsl(60, 100%, 43.5294117647%);}#mermaid-to-excalidraw .arrow1{stroke:hsl(60, 100%, 43.5294117647%);}#mermaid-to-excalidraw .branch-label2{fill:black;}#mermaid-to-excalidraw .commit2{stroke:hsl(80, 100%, 46.2745098039%);fill:hsl(80, 100%, 46.2745098039%);}#mermaid-to-excalidraw .commit-highlight2{stroke:rgb(48.8333333334, 0, 146.5000000001);fill:rgb(48.8333333334, 0, 146.5000000001);}#mermaid-to-excalidraw .label2{fill:hsl(80, 100%, 46.2745098039%);}#mermaid-to-excalidraw .arrow2{stroke:hsl(80, 100%, 46.2745098039%);}#mermaid-to-excalidraw .branch-label3{fill:#ffffff;}#mermaid-to-excalidraw .commit3{stroke:hsl(210, 100%, 46.2745098039%);fill:hsl(210, 100%, 46.2745098039%);}#mermaid-to-excalidraw .commit-highlight3{stroke:rgb(146.5000000001, 73.2500000001, 0);fill:rgb(146.5000000001, 73.2500000001, 0);}#mermaid-to-excalidraw .label3{fill:hsl(210, 100%, 46.2745098039%);}#mermaid-to-excalidraw .arrow3{stroke:hsl(210, 100%, 46.2745098039%);}#mermaid-to-excalidraw .branch-label4{fill:black;}#mermaid-to-excalidraw .commit4{stroke:hsl(180, 100%, 46.2745098039%);fill:hsl(180, 100%, 46.2745098039%);}#mermaid-to-excalidraw .commit-highlight4{stroke:rgb(146.5000000001, 0, 0);fill:rgb(146.5000000001, 0, 0);}#mermaid-to-excalidraw .label4{fill:hsl(180, 100%, 46.2745098039%);}#mermaid-to-excalidraw .arrow4{stroke:hsl(180, 100%, 46.2745098039%);}#mermaid-to-excalidraw .branch-label5{fill:black;}#mermaid-to-excalidraw .commit5{stroke:hsl(150, 100%, 46.2745098039%);fill:hsl(150, 100%, 46.2745098039%);}#mermaid-to-excalidraw .commit-highlight5{stroke:rgb(146.5000000001, 0, 73.2500000001);fill:rgb(146.5000000001, 0, 73.2500000001);}#mermaid-to-excalidraw .label5{fill:hsl(150, 100%, 46.2745098039%);}#mermaid-to-excalidraw .arrow5{stroke:hsl(150, 100%, 46.2745098039%);}#mermaid-to-excalidraw .branch-label6{fill:black;}#mermaid-to-excalidraw .commit6{stroke:hsl(300, 100%, 46.2745098039%);fill:hsl(300, 100%, 46.2745098039%);}#mermaid-to-excalidraw .commit-highlight6{stroke:rgb(0, 146.5000000001, 0);fill:rgb(0, 146.5000000001, 0);}#mermaid-to-excalidraw .label6{fill:hsl(300, 100%, 46.2745098039%);}#mermaid-to-excalidraw .arrow6{stroke:hsl(300, 100%, 46.2745098039%);}#mermaid-to-excalidraw .branch-label7{fill:black;}#mermaid-to-excalidraw .commit7{stroke:hsl(0, 100%, 46.2745098039%);fill:hsl(0, 100%, 46.2745098039%);}#mermaid-to-excalidraw .commit-highlight7{stroke:rgb(0, 146.5000000001, 146.5000000001);fill:rgb(0, 146.5000000001, 146.5000000001);}#mermaid-to-excalidraw .label7{fill:hsl(0, 100%, 46.2745098039%);}#mermaid-to-excalidraw .arrow7{stroke:hsl(0, 100%, 46.2745098039%);}#mermaid-to-excalidraw .branch{stroke-width:1;stroke:#333333;stroke-dasharray:2;}#mermaid-to-excalidraw .commit-label{font-size:10px;fill:#000021;}#mermaid-to-excalidraw .commit-label-bkg{font-size:10px;fill:#ffffde;opacity:0.5;}#mermaid-to-excalidraw .tag-label{font-size:10px;fill:#131300;}#mermaid-to-excalidraw .tag-label-bkg{fill:#ECECFF;stroke:hsl(240, 60%, 86.2745098039%);}#mermaid-to-excalidraw .tag-hole{fill:#333;}#mermaid-to-excalidraw .commit-merge{stroke:#ECECFF;fill:#ECECFF;}#mermaid-to-excalidraw .commit-reverse{stroke:#ECECFF;fill:#ECECFF;stroke-width:3;}#mermaid-to-excalidraw .commit-highlight-inner{stroke:#ECECFF;fill:#ECECFF;}#mermaid-to-excalidraw .arrow{stroke-width:8;stroke-linecap:round;fill:none;}#mermaid-to-excalidraw .gitTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-to-excalidraw :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}`,\n \"pie\": `#mermaid-to-excalidraw{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;fill:#333;}#mermaid-to-excalidraw .error-icon{fill:#552222;}#mermaid-to-excalidraw .error-text{fill:#552222;stroke:#552222;}#mermaid-to-excalidraw .edge-thickness-normal{stroke-width:2px;}#mermaid-to-excalidraw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-to-excalidraw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-to-excalidraw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-to-excalidraw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-to-excalidraw .marker{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .marker.cross{stroke:#333333;}#mermaid-to-excalidraw svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;}#mermaid-to-excalidraw .pieCircle{stroke:black;stroke-width:2px;opacity:0.7;}#mermaid-to-excalidraw .pieOuterCircle{stroke:black;stroke-width:2px;fill:none;}#mermaid-to-excalidraw .pieTitleText{text-anchor:middle;font-size:25px;fill:black;font-family:\"trebuchet ms\",verdana,arial,sans-serif;}#mermaid-to-excalidraw .slice{font-family:\"trebuchet ms\",verdana,arial,sans-serif;fill:#333;font-size:17px;}#mermaid-to-excalidraw .legend text{fill:black;font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:17px;}#mermaid-to-excalidraw :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}`,\n \"mindmap\": `#mermaid-to-excalidraw{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;fill:#333;}#mermaid-to-excalidraw .error-icon{fill:#552222;}#mermaid-to-excalidraw .error-text{fill:#552222;stroke:#552222;}#mermaid-to-excalidraw .edge-thickness-normal{stroke-width:2px;}#mermaid-to-excalidraw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-to-excalidraw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-to-excalidraw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-to-excalidraw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-to-excalidraw .marker{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .marker.cross{stroke:#333333;}#mermaid-to-excalidraw svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;}#mermaid-to-excalidraw .edge{stroke-width:3;}#mermaid-to-excalidraw .section--1 rect,#mermaid-to-excalidraw .section--1 path,#mermaid-to-excalidraw .section--1 circle,#mermaid-to-excalidraw .section--1 polygon,#mermaid-to-excalidraw .section--1 path{fill:hsl(240, 100%, 76.2745098039%);}#mermaid-to-excalidraw .section--1 text{fill:#ffffff;}#mermaid-to-excalidraw .node-icon--1{font-size:40px;color:#ffffff;}#mermaid-to-excalidraw .section-edge--1{stroke:hsl(240, 100%, 76.2745098039%);}#mermaid-to-excalidraw .edge-depth--1{stroke-width:17;}#mermaid-to-excalidraw .section--1 line{stroke:hsl(60, 100%, 86.2745098039%);stroke-width:3;}#mermaid-to-excalidraw .disabled,#mermaid-to-excalidraw .disabled circle,#mermaid-to-excalidraw .disabled text{fill:lightgray;}#mermaid-to-excalidraw .disabled text{fill:#efefef;}#mermaid-to-excalidraw .section-0 rect,#mermaid-to-excalidraw .section-0 path,#mermaid-to-excalidraw .section-0 circle,#mermaid-to-excalidraw .section-0 polygon,#mermaid-to-excalidraw .section-0 path{fill:hsl(60, 100%, 73.5294117647%);}#mermaid-to-excalidraw .section-0 text{fill:black;}#mermaid-to-excalidraw .node-icon-0{font-size:40px;color:black;}#mermaid-to-excalidraw .section-edge-0{stroke:hsl(60, 100%, 73.5294117647%);}#mermaid-to-excalidraw .edge-depth-0{stroke-width:14;}#mermaid-to-excalidraw .section-0 line{stroke:hsl(240, 100%, 83.5294117647%);stroke-width:3;}#mermaid-to-excalidraw .disabled,#mermaid-to-excalidraw .disabled circle,#mermaid-to-excalidraw .disabled text{fill:lightgray;}#mermaid-to-excalidraw .disabled text{fill:#efefef;}#mermaid-to-excalidraw .section-1 rect,#mermaid-to-excalidraw .section-1 path,#mermaid-to-excalidraw .section-1 circle,#mermaid-to-excalidraw .section-1 polygon,#mermaid-to-excalidraw .section-1 path{fill:hsl(80, 100%, 76.2745098039%);}#mermaid-to-excalidraw .section-1 text{fill:black;}#mermaid-to-excalidraw .node-icon-1{font-size:40px;color:black;}#mermaid-to-excalidraw .section-edge-1{stroke:hsl(80, 100%, 76.2745098039%);}#mermaid-to-excalidraw .edge-depth-1{stroke-width:11;}#mermaid-to-excalidraw .section-1 line{stroke:hsl(260, 100%, 86.2745098039%);stroke-width:3;}#mermaid-to-excalidraw .disabled,#mermaid-to-excalidraw .disabled circle,#mermaid-to-excalidraw .disabled text{fill:lightgray;}#mermaid-to-excalidraw .disabled text{fill:#efefef;}#mermaid-to-excalidraw .section-2 rect,#mermaid-to-excalidraw .section-2 path,#mermaid-to-excalidraw .section-2 circle,#mermaid-to-excalidraw .section-2 polygon,#mermaid-to-excalidraw .section-2 path{fill:hsl(270, 100%, 76.2745098039%);}#mermaid-to-excalidraw .section-2 text{fill:#ffffff;}#mermaid-to-excalidraw .node-icon-2{font-size:40px;color:#ffffff;}#mermaid-to-excalidraw .section-edge-2{stroke:hsl(270, 100%, 76.2745098039%);}#mermaid-to-excalidraw .edge-depth-2{stroke-width:8;}#mermaid-to-excalidraw .section-2 line{stroke:hsl(90, 100%, 86.2745098039%);stroke-width:3;}#mermaid-to-excalidraw .disabled,#mermaid-to-excalidraw .disabled circle,#mermaid-to-excalidraw .disabled text{fill:lightgray;}#mermaid-to-excalidraw .disabled text{fill:#efefef;}#mermaid-to-excalidraw .section-3 rect,#mermaid-to-excalidraw .section-3 path,#mermaid-to-excalidraw .section-3 circle,#mermaid-to-excalidraw .section-3 polygon,#mermaid-to-excalidraw .section-3 path{fill:hsl(300, 100%, 76.2745098039%);}#mermaid-to-excalidraw .section-3 text{fill:black;}#mermaid-to-excalidraw .node-icon-3{font-size:40px;color:black;}#mermaid-to-excalidraw .section-edge-3{stroke:hsl(300, 100%, 76.2745098039%);}#mermaid-to-excalidraw .edge-depth-3{stroke-width:5;}#mermaid-to-excalidraw .section-3 line{stroke:hsl(120, 100%, 86.2745098039%);stroke-width:3;}#mermaid-to-excalidraw .disabled,#mermaid-to-excalidraw .disabled circle,#mermaid-to-excalidraw .disabled text{fill:lightgray;}#mermaid-to-excalidraw .disabled text{fill:#efefef;}#mermaid-to-excalidraw .section-4 rect,#mermaid-to-excalidraw .section-4 path,#mermaid-to-excalidraw .section-4 circle,#mermaid-to-excalidraw .section-4 polygon,#mermaid-to-excalidraw .section-4 path{fill:hsl(330, 100%, 76.2745098039%);}#mermaid-to-excalidraw .section-4 text{fill:black;}#mermaid-to-excalidraw .node-icon-4{font-size:40px;color:black;}#mermaid-to-excalidraw .section-edge-4{stroke:hsl(330, 100%, 76.2745098039%);}#mermaid-to-excalidraw .edge-depth-4{stroke-width:2;}#mermaid-to-excalidraw .section-4 line{stroke:hsl(150, 100%, 86.2745098039%);stroke-width:3;}#mermaid-to-excalidraw .disabled,#mermaid-to-excalidraw .disabled circle,#mermaid-to-excalidraw .disabled text{fill:lightgray;}#mermaid-to-excalidraw .disabled text{fill:#efefef;}#mermaid-to-excalidraw .section-5 rect,#mermaid-to-excalidraw .section-5 path,#mermaid-to-excalidraw .section-5 circle,#mermaid-to-excalidraw .section-5 polygon,#mermaid-to-excalidraw .section-5 path{fill:hsl(0, 100%, 76.2745098039%);}#mermaid-to-excalidraw .section-5 text{fill:black;}#mermaid-to-excalidraw .node-icon-5{font-size:40px;color:black;}#mermaid-to-excalidraw .section-edge-5{stroke:hsl(0, 100%, 76.2745098039%);}#mermaid-to-excalidraw .edge-depth-5{stroke-width:-1;}#mermaid-to-excalidraw .section-5 line{stroke:hsl(180, 100%, 86.2745098039%);stroke-width:3;}#mermaid-to-excalidraw .disabled,#mermaid-to-excalidraw .disabled circle,#mermaid-to-excalidraw .disabled text{fill:lightgray;}#mermaid-to-excalidraw .disabled text{fill:#efefef;}#mermaid-to-excalidraw .section-6 rect,#mermaid-to-excalidraw .section-6 path,#mermaid-to-excalidraw .section-6 circle,#mermaid-to-excalidraw .section-6 polygon,#mermaid-to-excalidraw .section-6 path{fill:hsl(30, 100%, 76.2745098039%);}#mermaid-to-excalidraw .section-6 text{fill:black;}#mermaid-to-excalidraw .node-icon-6{font-size:40px;color:black;}#mermaid-to-excalidraw .section-edge-6{stroke:hsl(30, 100%, 76.2745098039%);}#mermaid-to-excalidraw .edge-depth-6{stroke-width:-4;}#mermaid-to-excalidraw .section-6 line{stroke:hsl(210, 100%, 86.2745098039%);stroke-width:3;}#mermaid-to-excalidraw .disabled,#mermaid-to-excalidraw .disabled circle,#mermaid-to-excalidraw .disabled text{fill:lightgray;}#mermaid-to-excalidraw .disabled text{fill:#efefef;}#mermaid-to-excalidraw .section-7 rect,#mermaid-to-excalidraw .section-7 path,#mermaid-to-excalidraw .section-7 circle,#mermaid-to-excalidraw .section-7 polygon,#mermaid-to-excalidraw .section-7 path{fill:hsl(90, 100%, 76.2745098039%);}#mermaid-to-excalidraw .section-7 text{fill:black;}#mermaid-to-excalidraw .node-icon-7{font-size:40px;color:black;}#mermaid-to-excalidraw .section-edge-7{stroke:hsl(90, 100%, 76.2745098039%);}#mermaid-to-excalidraw .edge-depth-7{stroke-width:-7;}#mermaid-to-excalidraw .section-7 line{stroke:hsl(270, 100%, 86.2745098039%);stroke-width:3;}#mermaid-to-excalidraw .disabled,#mermaid-to-excalidraw .disabled circle,#mermaid-to-excalidraw .disabled text{fill:lightgray;}#mermaid-to-excalidraw .disabled text{fill:#efefef;}#mermaid-to-excalidraw .section-8 rect,#mermaid-to-excalidraw .section-8 path,#mermaid-to-excalidraw .section-8 circle,#mermaid-to-excalidraw .section-8 polygon,#mermaid-to-excalidraw .section-8 path{fill:hsl(150, 100%, 76.2745098039%);}#mermaid-to-excalidraw .section-8 text{fill:black;}#mermaid-to-excalidraw .node-icon-8{font-size:40px;color:black;}#mermaid-to-excalidraw .section-edge-8{stroke:hsl(150, 100%, 76.2745098039%);}#mermaid-to-excalidraw .edge-depth-8{stroke-width:-10;}#mermaid-to-excalidraw .section-8 line{stroke:hsl(330, 100%, 86.2745098039%);stroke-width:3;}#mermaid-to-excalidraw .disabled,#mermaid-to-excalidraw .disabled circle,#mermaid-to-excalidraw .disabled text{fill:lightgray;}#mermaid-to-excalidraw .disabled text{fill:#efefef;}#mermaid-to-excalidraw .section-9 rect,#mermaid-to-excalidraw .section-9 path,#mermaid-to-excalidraw .section-9 circle,#mermaid-to-excalidraw .section-9 polygon,#mermaid-to-excalidraw .section-9 path{fill:hsl(180, 100%, 76.2745098039%);}#mermaid-to-excalidraw .section-9 text{fill:black;}#mermaid-to-excalidraw .node-icon-9{font-size:40px;color:black;}#mermaid-to-excalidraw .section-edge-9{stroke:hsl(180, 100%, 76.2745098039%);}#mermaid-to-excalidraw .edge-depth-9{stroke-width:-13;}#mermaid-to-excalidraw .section-9 line{stroke:hsl(0, 100%, 86.2745098039%);stroke-width:3;}#mermaid-to-excalidraw .disabled,#mermaid-to-excalidraw .disabled circle,#mermaid-to-excalidraw .disabled text{fill:lightgray;}#mermaid-to-excalidraw .disabled text{fill:#efefef;}#mermaid-to-excalidraw .section-10 rect,#mermaid-to-excalidraw .section-10 path,#mermaid-to-excalidraw .section-10 circle,#mermaid-to-excalidraw .section-10 polygon,#mermaid-to-excalidraw .section-10 path{fill:hsl(210, 100%, 76.2745098039%);}#mermaid-to-excalidraw .section-10 text{fill:black;}#mermaid-to-excalidraw .node-icon-10{font-size:40px;color:black;}#mermaid-to-excalidraw .section-edge-10{stroke:hsl(210, 100%, 76.2745098039%);}#mermaid-to-excalidraw .edge-depth-10{stroke-width:-16;}#mermaid-to-excalidraw .section-10 line{stroke:hsl(30, 100%, 86.2745098039%);stroke-width:3;}#mermaid-to-excalidraw .disabled,#mermaid-to-excalidraw .disabled circle,#mermaid-to-excalidraw .disabled text{fill:lightgray;}#mermaid-to-excalidraw .disabled text{fill:#efefef;}#mermaid-to-excalidraw .section-root rect,#mermaid-to-excalidraw .section-root path,#mermaid-to-excalidraw .section-root circle,#mermaid-to-excalidraw .section-root polygon{fill:hsl(240, 100%, 46.2745098039%);}#mermaid-to-excalidraw .section-root text{fill:#ffffff;}#mermaid-to-excalidraw .icon-container{height:100%;display:flex;justify-content:center;align-items:center;}#mermaid-to-excalidraw .edge{fill:none;}#mermaid-to-excalidraw .mindmap-node-label{dy:1em;alignment-baseline:middle;text-anchor:middle;dominant-baseline:middle;text-align:center;}#mermaid-to-excalidraw :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}`,\n \"quadrantChart\": `#mermaid-to-excalidraw{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;fill:#333;}#mermaid-to-excalidraw .error-icon{fill:#552222;}#mermaid-to-excalidraw .error-text{fill:#552222;stroke:#552222;}#mermaid-to-excalidraw .edge-thickness-normal{stroke-width:2px;}#mermaid-to-excalidraw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-to-excalidraw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-to-excalidraw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-to-excalidraw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-to-excalidraw .marker{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .marker.cross{stroke:#333333;}#mermaid-to-excalidraw svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;}#mermaid-to-excalidraw :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}`,\n \"classDiagram\": `#mermaid-to-excalidraw{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;fill:#333;}#mermaid-to-excalidraw .error-icon{fill:#552222;}#mermaid-to-excalidraw .error-text{fill:#552222;stroke:#552222;}#mermaid-to-excalidraw .edge-thickness-normal{stroke-width:2px;}#mermaid-to-excalidraw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-to-excalidraw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-to-excalidraw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-to-excalidraw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-to-excalidraw .marker{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .marker.cross{stroke:#333333;}#mermaid-to-excalidraw svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;}#mermaid-to-excalidraw g.classGroup text{fill:#9370DB;fill:#131300;stroke:none;font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:10px;}#mermaid-to-excalidraw g.classGroup text .title{font-weight:bolder;}#mermaid-to-excalidraw .nodeLabel,#mermaid-to-excalidraw .edgeLabel{color:#131300;}#mermaid-to-excalidraw .edgeLabel .label rect{fill:#ECECFF;}#mermaid-to-excalidraw .label text{fill:#131300;}#mermaid-to-excalidraw .edgeLabel .label span{background:#ECECFF;}#mermaid-to-excalidraw .classTitle{font-weight:bolder;}#mermaid-to-excalidraw .node rect,#mermaid-to-excalidraw .node circle,#mermaid-to-excalidraw .node ellipse,#mermaid-to-excalidraw .node polygon,#mermaid-to-excalidraw .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-to-excalidraw .divider{stroke:#9370DB;stroke-width:1;}#mermaid-to-excalidraw g.clickable{cursor:pointer;}#mermaid-to-excalidraw g.classGroup rect{fill:#ECECFF;stroke:#9370DB;}#mermaid-to-excalidraw g.classGroup line{stroke:#9370DB;stroke-width:1;}#mermaid-to-excalidraw .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5;}#mermaid-to-excalidraw .classLabel .label{fill:#9370DB;font-size:10px;}#mermaid-to-excalidraw .relation{stroke:#333333;stroke-width:1;fill:none;}#mermaid-to-excalidraw .dashed-line{stroke-dasharray:3;}#mermaid-to-excalidraw .dotted-line{stroke-dasharray:1 2;}#mermaid-to-excalidraw #compositionStart,#mermaid-to-excalidraw .composition{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #compositionEnd,#mermaid-to-excalidraw .composition{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #dependencyStart,#mermaid-to-excalidraw .dependency{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #dependencyStart,#mermaid-to-excalidraw .dependency{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #extensionStart,#mermaid-to-excalidraw .extension{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #extensionEnd,#mermaid-to-excalidraw .extension{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #aggregationStart,#mermaid-to-excalidraw .aggregation{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #aggregationEnd,#mermaid-to-excalidraw .aggregation{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #lollipopStart,#mermaid-to-excalidraw .lollipop{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #lollipopEnd,#mermaid-to-excalidraw .lollipop{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw .edgeTerminals{font-size:11px;}#mermaid-to-excalidraw .classTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-to-excalidraw :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}`,\n};\n//const style = `#mermaid-to-excalidraw{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;fill:#333;}#mermaid-to-excalidraw .error-icon{fill:#552222;}#mermaid-to-excalidraw .error-text{fill:#552222;stroke:#552222;}#mermaid-to-excalidraw .edge-thickness-normal{stroke-width:2px;}#mermaid-to-excalidraw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-to-excalidraw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-to-excalidraw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-to-excalidraw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-to-excalidraw .marker{fill:#333333;stroke:#333333;}#mermaid-to-excalidraw .marker.cross{stroke:#333333;}#mermaid-to-excalidraw svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:25px;}#mermaid-to-excalidraw g.classGroup text{fill:#9370DB;fill:#131300;stroke:none;font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:10px;}#mermaid-to-excalidraw g.classGroup text .title{font-weight:bolder;}#mermaid-to-excalidraw .nodeLabel,#mermaid-to-excalidraw .edgeLabel{color:#131300;}#mermaid-to-excalidraw .edgeLabel .label rect{fill:#ECECFF;}#mermaid-to-excalidraw .label text{fill:#131300;}#mermaid-to-excalidraw .edgeLabel .label span{background:#ECECFF;}#mermaid-to-excalidraw .classTitle{font-weight:bolder;}#mermaid-to-excalidraw .node rect,#mermaid-to-excalidraw .node circle,#mermaid-to-excalidraw .node ellipse,#mermaid-to-excalidraw .node polygon,#mermaid-to-excalidraw .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-to-excalidraw .divider{stroke:#9370DB;stroke-width:1;}#mermaid-to-excalidraw g.clickable{cursor:pointer;}#mermaid-to-excalidraw g.classGroup rect{fill:#ECECFF;stroke:#9370DB;}#mermaid-to-excalidraw g.classGroup line{stroke:#9370DB;stroke-width:1;}#mermaid-to-excalidraw .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5;}#mermaid-to-excalidraw .classLabel .label{fill:#9370DB;font-size:10px;}#mermaid-to-excalidraw .relation{stroke:#333333;stroke-width:1;fill:none;}#mermaid-to-excalidraw .dashed-line{stroke-dasharray:3;}#mermaid-to-excalidraw .dotted-line{stroke-dasharray:1 2;}#mermaid-to-excalidraw #compositionStart,#mermaid-to-excalidraw .composition{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #compositionEnd,#mermaid-to-excalidraw .composition{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #dependencyStart,#mermaid-to-excalidraw .dependency{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #dependencyStart,#mermaid-to-excalidraw .dependency{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #extensionStart,#mermaid-to-excalidraw .extension{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #extensionEnd,#mermaid-to-excalidraw .extension{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #aggregationStart,#mermaid-to-excalidraw .aggregation{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #aggregationEnd,#mermaid-to-excalidraw .aggregation{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #lollipopStart,#mermaid-to-excalidraw .lollipop{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw #lollipopEnd,#mermaid-to-excalidraw .lollipop{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-to-excalidraw .edgeTerminals{font-size:11px;}#mermaid-to-excalidraw .classTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-to-excalidraw :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}`;\nconst replaceSVGStyle = (svg, type) => {\n if (style.hasOwnProperty(type)) {\n return svg.replace(/<style>.*<\\/style>/i, `<style>${style[type]}</style>`);\n }\n return svg;\n};\n/*export const setDefaultConfig = () =>\n window.mermaid.mermaidAPI.setConfig({\n theme: \"default\",\n themeCSS: undefined,\n themeVariables: defaultThemeVariables,\n });\n\n const defaultThemeVariables = {\n \"background\": \"white\",\n \"primaryColor\": \"#ECECFF\",\n \"secondaryColor\": \"#ffffde\",\n \"tertiaryColor\": \"hsl(80, 100%, 96.2745098039%)\",\n \"primaryBorderColor\": \"hsl(240, 60%, 86.2745098039%)\",\n \"secondaryBorderColor\": \"hsl(60, 60%, 83.5294117647%)\",\n \"tertiaryBorderColor\": \"hsl(80, 60%, 86.2745098039%)\",\n \"primaryTextColor\": \"#131300\",\n \"secondaryTextColor\": \"#000021\",\n \"tertiaryTextColor\": \"rgb(6.3333333334, 0, 19.0000000001)\",\n \"lineColor\": \"#333333\",\n \"textColor\": \"#333\",\n \"mainBkg\": \"#ECECFF\",\n \"secondBkg\": \"#ffffde\",\n \"border1\": \"#9370DB\",\n \"border2\": \"#aaaa33\",\n \"arrowheadColor\": \"#333333\",\n \"fontFamily\": \"\\\"trebuchet ms\\\", verdana, arial, sans-serif\",\n \"fontSize\": \"25px\",\n \"labelBackground\": \"#e8e8e8\",\n \"THEME_COLOR_LIMIT\": 12,\n \"nodeBkg\": \"#ECECFF\",\n \"nodeBorder\": \"#9370DB\",\n \"clusterBkg\": \"#ffffde\",\n \"clusterBorder\": \"#aaaa33\",\n \"defaultLinkColor\": \"#333333\",\n \"titleColor\": \"#333\",\n \"edgeLabelBackground\": \"#e8e8e8\",\n \"actorBorder\": \"hsl(259.6261682243, 59.7765363128%, 87.9019607843%)\",\n \"actorBkg\": \"#ECECFF\",\n \"actorTextColor\": \"black\",\n \"actorLineColor\": \"grey\",\n \"signalColor\": \"#333\",\n \"signalTextColor\": \"#333\",\n \"labelBoxBkgColor\": \"#ECECFF\",\n \"labelBoxBorderColor\": \"hsl(259.6261682243, 59.7765363128%, 87.9019607843%)\",\n \"labelTextColor\": \"black\",\n \"loopTextColor\": \"black\",\n \"noteBorderColor\": \"#aaaa33\",\n \"noteBkgColor\": \"#fff5ad\",\n \"noteTextColor\": \"black\",\n \"activationBorderColor\": \"#666\",\n \"activationBkgColor\": \"#f4f4f4\",\n \"sequenceNumberColor\": \"white\",\n \"sectionBkgColor\": \"rgba(102, 102, 255, 0.49)\",\n \"altSectionBkgColor\": \"white\",\n \"sectionBkgColor2\": \"#fff400\",\n \"excludeBkgColor\": \"#eeeeee\",\n \"taskBorderColor\": \"#534fbc\",\n \"taskBkgColor\": \"#8a90dd\",\n \"taskTextLightColor\": \"white\",\n \"taskTextColor\": \"white\",\n \"taskTextDarkColor\": \"black\",\n \"taskTextOutsideColor\": \"black\",\n \"taskTextClickableColor\": \"#003163\",\n \"activeTaskBorderColor\": \"#534fbc\",\n \"activeTaskBkgColor\": \"#bfc7ff\",\n \"gridColor\": \"lightgrey\",\n \"doneTaskBkgColor\": \"lightgrey\",\n \"doneTaskBorderColor\": \"grey\",\n \"critBorderColor\": \"#ff8888\",\n \"critBkgColor\": \"red\",\n \"todayLineColor\": \"red\",\n \"personBorder\": \"hsl(240, 60%, 86.2745098039%)\",\n \"personBkg\": \"#ECECFF\",\n \"labelColor\": \"black\",\n \"errorBkgColor\": \"#552222\",\n \"errorTextColor\": \"#552222\",\n \"cScale0\": \"hsl(240, 100%, 76.2745098039%)\",\n \"cScale1\": \"hsl(60, 100%, 73.5294117647%)\",\n \"cScale2\": \"hsl(80, 100%, 76.2745098039%)\",\n \"cScale3\": \"hsl(270, 100%, 76.2745098039%)\",\n \"cScale4\": \"hsl(300, 100%, 76.2745098039%)\",\n \"cScale5\": \"hsl(330, 100%, 76.2745098039%)\",\n \"cScale6\": \"hsl(0, 100%, 76.2745098039%)\",\n \"cScale7\": \"hsl(30, 100%, 76.2745098039%)\",\n \"cScale8\": \"hsl(90, 100%, 76.2745098039%)\",\n \"cScale9\": \"hsl(150, 100%, 76.2745098039%)\",\n \"cScale10\": \"hsl(180, 100%, 76.2745098039%)\",\n \"cScale11\": \"hsl(210, 100%, 76.2745098039%)\",\n \"cScalePeer1\": \"hsl(60, 100%, 48.5294117647%)\",\n \"cScalePeer2\": \"hsl(80, 100%, 56.2745098039%)\",\n \"cScalePeer0\": \"hsl(240, 100%, 61.2745098039%)\",\n \"cScalePeer3\": \"hsl(270, 100%, 61.2745098039%)\",\n \"cScalePeer4\": \"hsl(300, 100%, 61.2745098039%)\",\n \"cScalePeer5\": \"hsl(330, 100%, 61.2745098039%)\",\n \"cScalePeer6\": \"hsl(0, 100%, 61.2745098039%)\",\n \"cScalePeer7\": \"hsl(30, 100%, 61.2745098039%)\",\n \"cScalePeer8\": \"hsl(90, 100%, 61.2745098039%)\",\n \"cScalePeer9\": \"hsl(150, 100%, 61.2745098039%)\",\n \"cScalePeer10\": \"hsl(180, 100%, 61.2745098039%)\",\n \"cScalePeer11\": \"hsl(210, 100%, 61.2745098039%)\",\n \"cScaleInv0\": \"hsl(60, 100%, 86.2745098039%)\",\n \"cScaleInv1\": \"hsl(240, 100%, 83.5294117647%)\",\n \"cScaleInv2\": \"hsl(260, 100%, 86.2745098039%)\",\n \"cScaleInv3\": \"hsl(90, 100%, 86.2745098039%)\",\n \"cScaleInv4\": \"hsl(120, 100%, 86.2745098039%)\",\n \"cScaleInv5\": \"hsl(150, 100%, 86.2745098039%)\",\n \"cScaleInv6\": \"hsl(180, 100%, 86.2745098039%)\",\n \"cScaleInv7\": \"hsl(210, 100%, 86.2745098039%)\",\n \"cScaleInv8\": \"hsl(270, 100%, 86.2745098039%)\",\n \"cScaleInv9\": \"hsl(330, 100%, 86.2745098039%)\",\n \"cScaleInv10\": \"hsl(0, 100%, 86.2745098039%)\",\n \"cScaleInv11\": \"hsl(30, 100%, 86.2745098039%)\",\n \"surface0\": \"hsl(270, 100%, 91.2745098039%)\",\n \"surfacePeer0\": \"hsl(270, 100%, 89.2745098039%)\",\n \"surface1\": \"hsl(270, 100%, 86.2745098039%)\",\n \"surfacePeer1\": \"hsl(270, 100%, 84.2745098039%)\",\n \"surface2\": \"hsl(270, 100%, 81.2745098039%)\",\n \"surfacePeer2\": \"hsl(270, 100%, 79.2745098039%)\",\n \"surface3\": \"hsl(270, 100%, 76.2745098039%)\",\n \"surfacePeer3\": \"hsl(270, 100%, 74.2745098039%)\",\n \"surface4\": \"hsl(270, 100%, 71.2745098039%)\",\n \"surfacePeer4\": \"hsl(270, 100%, 69.2745098039%)\",\n \"scaleLabelColor\": \"black\",\n \"transitionColor\": \"#333333\",\n \"transitionLabelColor\": \"#333\",\n \"stateLabelColor\": \"#131300\",\n \"stateBkg\": \"#ECECFF\",\n \"labelBackgroundColor\": \"#ECECFF\",\n \"compositeBackground\": \"white\",\n \"altBackground\": \"#f0f0f0\",\n \"compositeTitleBackground\": \"#ECECFF\",\n \"compositeBorder\": \"#9370DB\",\n \"innerEndBackground\": \"#9370DB\",\n \"specialStateColor\": \"#333333\",\n \"classText\": \"#131300\",\n \"fillType0\": \"#ECECFF\",\n \"fillType1\": \"#ffffde\",\n \"fillType2\": \"hsl(304, 100%, 96.2745098039%)\",\n \"fillType3\": \"hsl(124, 100%, 93.5294117647%)\",\n \"fillType4\": \"hsl(176, 100%, 96.2745098039%)\",\n \"fillType5\": \"hsl(-4, 100%, 93.5294117647%)\",\n \"fillType6\": \"hsl(8, 100%, 96.2745098039%)\",\n \"fillType7\": \"hsl(188, 100%, 93.5294117647%)\",\n \"pie1\": \"#ECECFF\",\n \"pie2\": \"#ffffde\",\n \"pie3\": \"hsl(80, 100%, 56.2745098039%)\",\n \"pie4\": \"hsl(240, 100%, 86.2745098039%)\",\n \"pie5\": \"hsl(60, 100%, 63.5294117647%)\",\n \"pie6\": \"hsl(80, 100%, 76.2745098039%)\",\n \"pie7\": \"hsl(300, 100%, 76.2745098039%)\",\n \"pie8\": \"hsl(180, 100%, 56.2745098039%)\",\n \"pie9\": \"hsl(0, 100%, 56.2745098039%)\",\n \"pie10\": \"hsl(300, 100%, 56.2745098039%)\",\n \"pie11\": \"hsl(150, 100%, 56.2745098039%)\",\n \"pie12\": \"hsl(0, 100%, 66.2745098039%)\",\n \"pieTitleTextSize\": \"25px\",\n \"pieTitleTextColor\": \"black\",\n \"pieSectionTextSize\": \"17px\",\n \"pieSectionTextColor\": \"#333\",\n \"pieLegendTextSize\": \"17px\",\n \"pieLegendTextColor\": \"black\",\n \"pieStrokeColor\": \"black\",\n \"pieStrokeWidth\": \"2px\",\n \"pieOuterStrokeWidth\": \"2px\",\n \"pieOuterStrokeColor\": \"black\",\n \"pieOpacity\": \"0.7\",\n \"quadrant1Fill\": \"#ECECFF\",\n \"quadrant2Fill\": \"#f1f1ff\",\n \"quadrant3Fill\": \"#f6f6ff\",\n \"quadrant4Fill\": \"#fbfbff\",\n \"quadrant1TextFill\": \"#131300\",\n \"quadrant2TextFill\": \"#0e0e00\",\n \"quadrant3TextFill\": \"#090900\",\n \"quadrant4TextFill\": \"#040400\",\n \"quadrantPointFill\": \"hsl(240, 100%, NaN%)\",\n \"quadrantPointTextFill\": \"#131300\",\n \"quadrantXAxisTextFill\": \"#131300\",\n \"quadrantYAxisTextFill\": \"#131300\",\n \"quadrantInternalBorderStrokeFill\": \"hsl(240, 60%, 86.2745098039%)\",\n \"quadrantExternalBorderStrokeFill\": \"hsl(240, 60%, 86.2745098039%)\",\n \"quadrantTitleFill\": \"#131300\",\n \"requirementBackground\": \"#ECECFF\",\n \"requirementBorderColor\": \"hsl(240, 60%, 86.2745098039%)\",\n \"requirementBorderSize\": \"1\",\n \"requirementTextColor\": \"#131300\",\n \"relationColor\": \"#333333\",\n \"relationLabelBackground\": \"#e8e8e8\",\n \"relationLabelColor\": \"black\",\n \"git0\": \"hsl(240, 100%, 46.2745098039%)\",\n \"git1\": \"hsl(60, 100%, 43.5294117647%)\",\n \"git2\": \"hsl(80, 100%, 46.2745098039%)\",\n \"git3\": \"hsl(210, 100%, 46.2745098039%)\",\n \"git4\": \"hsl(180, 100%, 46.2745098039%)\",\n \"git5\": \"hsl(150, 100%, 46.2745098039%)\",\n \"git6\": \"hsl(300, 100%, 46.2745098039%)\",\n \"git7\": \"hsl(0, 100%, 46.2745098039%)\",\n \"gitInv0\": \"hsl(60, 100%, 3.7254901961%)\",\n \"gitInv1\": \"rgb(0, 0, 160.5)\",\n \"gitInv2\": \"rgb(48.8333333334, 0, 146.5000000001)\",\n \"gitInv3\": \"rgb(146.5000000001, 73.2500000001, 0)\",\n \"gitInv4\": \"rgb(146.5000000001, 0, 0)\",\n \"gitInv5\": \"rgb(146.5000000001, 0, 73.2500000001)\",\n \"gitInv6\": \"rgb(0, 146.5000000001, 0)\",\n \"gitInv7\": \"rgb(0, 146.5000000001, 146.5000000001)\",\n \"gitBranchLabel0\": \"#ffffff\",\n \"gitBranchLabel1\": \"black\",\n \"gitBranchLabel2\": \"black\",\n \"gitBranchLabel3\": \"#ffffff\",\n \"gitBranchLabel4\": \"black\",\n \"gitBranchLabel5\": \"black\",\n \"gitBranchLabel6\": \"black\",\n \"gitBranchLabel7\": \"black\",\n \"tagLabelColor\": \"#131300\",\n \"tagLabelBackground\": \"#ECECFF\",\n \"tagLabelBorder\": \"hsl(240, 60%, 86.2745098039%)\",\n \"tagLabelFontSize\": \"10px\",\n \"commitLabelColor\": \"#000021\",\n \"commitLabelBackground\": \"#ffffde\",\n \"commitLabelFontSize\": \"10px\",\n \"attributeBackgroundColorOdd\": \"#ffffff\",\n \"attributeBackgroundColorEven\": \"#f2f2f2\",\n \"cScaleLabel0\": \"#ffffff\",\n \"cScaleLabel3\": \"#ffffff\",\n \"cScaleLabel1\": \"black\",\n \"cScaleLabel2\": \"black\",\n \"cScaleLabel4\": \"black\",\n \"cScaleLabel5\": \"black\",\n \"cScaleLabel6\": \"black\",\n \"cScaleLabel7\": \"black\",\n \"cScaleLabel8\": \"black\",\n \"cScaleLabel9\": \"black\",\n \"cScaleLabel10\": \"black\",\n \"cScaleLabel11\": \"black\"\n};*/\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/obsidianUtil.js?");
5299
+
5300
+ /***/ }),
5301
+
5225
5302
  /***/ "../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/parseMermaid.js":
5226
5303
  /*!***********************************************************************************!*\
5227
5304
  !*** ../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/parseMermaid.js ***!
@@ -5229,7 +5306,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
5229
5306
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
5230
5307
 
5231
5308
  "use strict";
5232
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"parseMermaid\": () => (/* binding */ parseMermaid)\n/* harmony export */ });\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants.js */ \"../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/constants.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/utils.js\");\n/* harmony import */ var _parser_flowchart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/flowchart.js */ \"../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/parser/flowchart.js\");\n\n\n\nconst mermaid = window.mermaid;\nconst processMermaidTextWithOptions = (definition, options) => {\n const diagramInitOptions = {\n // Add options for rendering flowchart in linear curves (for better extracting arrow path points) and custom font size\n flowchart: {\n curve: options?.curve || \"basis\",\n },\n // Increase the Mermaid's font size by multiplying with 1.25 to match the Excalidraw Virgil font\n themeVariables: {\n fontSize: `${(options?.fontSize || _constants_js__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_FONT_SIZE) * 1.25}px`,\n },\n };\n const fullDefinition = `%%{init: ${JSON.stringify(diagramInitOptions)}}%%\\n${definition}`;\n return fullDefinition;\n};\n// Fallback to Svg\nconst convertSvgToGraphImage = (svgContainer) => {\n // Extract SVG width and height\n // TODO: make width and height change dynamically based on user's screen dimension\n const svgEl = svgContainer.querySelector(\"svg\");\n if (!svgEl) {\n throw new Error(\"SVG element not found\");\n }\n const rect = svgEl.getBoundingClientRect();\n const width = rect.width;\n const height = rect.height;\n // Set width and height explictly since in firefox it gets set to 0\n // if the width and height are not expilcitly set\n // eg in some cases like er Diagram, gnatt, width and height is set as 100%\n // which sets the dimensions as 0 in firefox and thus the diagram isn't rendered\n svgEl.setAttribute(\"width\", `${width}`);\n svgEl.setAttribute(\"height\", `${height}`);\n // Convert SVG to image\n const mimeType = \"image/svg+xml\";\n const decoded = unescape(encodeURIComponent(svgEl.outerHTML));\n const base64 = btoa(decoded);\n const dataURL = `data:image/svg+xml;base64,${base64}`;\n const graphImage = {\n type: \"graphImage\",\n mimeType,\n dataURL,\n width,\n height,\n };\n return graphImage;\n};\nconst parseMermaid = async (definition, options = {}) => {\n //mermaid.initialize({ startOnLoad: false });\n const fullDefinition = processMermaidTextWithOptions(definition, {\n curve: (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.isSupportedDiagram)(definition) ? \"linear\" : \"basis\",\n fontSize: options.fontSize,\n });\n // Parse the diagram\n const diagram = await mermaid.mermaidAPI.getDiagramFromText(fullDefinition);\n // Render the SVG diagram\n const { svg } = await mermaid.render(\"mermaid-to-excalidraw\", fullDefinition);\n // Append Svg to DOM\n const svgContainer = document.createElement(\"div\");\n svgContainer.setAttribute(\"style\", `opacity: 0; position: relative; z-index: -1;`);\n svgContainer.innerHTML = svg;\n svgContainer.id = \"mermaid-diagram\";\n document.body.appendChild(svgContainer);\n let data;\n switch (diagram.type) {\n case \"flowchart-v2\": {\n data = (0,_parser_flowchart_js__WEBPACK_IMPORTED_MODULE_2__.parseMermaidFlowChartDiagram)(diagram, svgContainer);\n break;\n }\n // fallback to image if diagram type not-supported\n default: {\n data = convertSvgToGraphImage(svgContainer);\n }\n }\n svgContainer.remove();\n return data;\n};\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/parseMermaid.js?");
5309
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"parseMermaid\": () => (/* binding */ parseMermaid)\n/* harmony export */ });\n/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants.js */ \"../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/constants.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/utils.js\");\n/* harmony import */ var _parser_flowchart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/flowchart.js */ \"../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/parser/flowchart.js\");\n/* harmony import */ var _obsidianUtil_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./obsidianUtil.js */ \"../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/obsidianUtil.js\");\n\n\n\n //zsviczian\nconst processMermaidTextWithOptions = (definition, options) => {\n const diagramInitOptions = {\n // Add options for rendering flowchart in linear curves (for better extracting arrow path points) and custom font size\n flowchart: {\n curve: options?.curve || \"basis\",\n },\n // Increase the Mermaid's font size by multiplying with 1.25 to match the Excalidraw Virgil font\n themeVariables: {\n fontSize: `${(options?.fontSize || _constants_js__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_FONT_SIZE) * 1.25}px`,\n },\n };\n const fullDefinition = `%%{init: ${JSON.stringify(diagramInitOptions)}}%%\\n${definition}`;\n return fullDefinition;\n};\n// Fallback to Svg\nconst convertSvgToGraphImage = (svgContainer) => {\n // Extract SVG width and height\n // TODO: make width and height change dynamically based on user's screen dimension\n const svgEl = svgContainer.querySelector(\"svg\");\n if (!svgEl) {\n throw new Error(\"SVG element not found\");\n }\n const rect = svgEl.getBoundingClientRect();\n const width = rect.width;\n const height = rect.height;\n // Set width and height explictly since in firefox it gets set to 0\n // if the width and height are not expilcitly set\n // eg in some cases like er Diagram, gnatt, width and height is set as 100%\n // which sets the dimensions as 0 in firefox and thus the diagram isn't rendered\n svgEl.setAttribute(\"width\", `${width}`);\n svgEl.setAttribute(\"height\", `${height}`);\n // Convert SVG to image\n const mimeType = \"image/svg+xml\";\n const decoded = unescape(encodeURIComponent(svgEl.outerHTML));\n const base64 = btoa(decoded);\n const dataURL = `data:image/svg+xml;base64,${base64}`;\n const graphImage = {\n type: \"graphImage\",\n mimeType,\n dataURL,\n width,\n height,\n };\n return graphImage;\n};\nconst parseMermaid = async (definition, options = {}) => {\n //mermaid.initialize({ startOnLoad: false });\n const fullDefinition = processMermaidTextWithOptions(definition, {\n curve: (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.isSupportedDiagram)(definition) ? \"linear\" : \"basis\",\n fontSize: options.fontSize,\n });\n // Parse the diagram //zsviczian\n const diagram = await window.mermaid.mermaidAPI.getDiagramFromText(fullDefinition);\n // Render the SVG diagram //zsviczian\n const { svg } = await window.mermaid.render(\"mermaid-to-excalidraw\", fullDefinition);\n // Append Svg to DOM\n const svgContainer = document.createElement(\"div\");\n svgContainer.setAttribute(\"style\", `opacity: 0; position: relative; z-index: -1;`);\n svgContainer.innerHTML = (0,_obsidianUtil_js__WEBPACK_IMPORTED_MODULE_3__.replaceSVGStyle)(svg, diagram.type); //zsviczian\n svgContainer.id = \"mermaid-diagram\";\n document.body.appendChild(svgContainer);\n let data;\n switch (diagram.type) {\n case \"flowchart-v2\": {\n data = (0,_parser_flowchart_js__WEBPACK_IMPORTED_MODULE_2__.parseMermaidFlowChartDiagram)(diagram, svgContainer);\n break;\n }\n // fallback to image if diagram type not-supported\n default: {\n data = convertSvgToGraphImage(svgContainer);\n }\n }\n svgContainer.remove();\n return data;\n};\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../../node_modules/@zsviczian/mermaid-to-excalidraw/dist/parseMermaid.js?");
5233
5310
 
5234
5311
  /***/ }),
5235
5312
 
@@ -5559,7 +5636,7 @@ eval("module.exports = JSON.parse('{\"labels\":{\"paste\":\"Επικόλληση
5559
5636
  /***/ ((module) => {
5560
5637
 
5561
5638
  "use strict";
5562
- eval("module.exports = JSON.parse('{\"labels\":{\"paste\":\"Paste\",\"pasteAsPlaintext\":\"Paste as plaintext\",\"pasteCharts\":\"Paste charts\",\"selectAll\":\"Select all\",\"multiSelect\":\"Add element to selection\",\"moveCanvas\":\"Move canvas\",\"cut\":\"Cut\",\"copy\":\"Copy\",\"copyAsPng\":\"Copy to clipboard as PNG\",\"copyAsSvg\":\"Copy to clipboard as SVG\",\"copyText\":\"Copy to clipboard as text\",\"bringForward\":\"Bring forward\",\"sendToBack\":\"Send to back\",\"bringToFront\":\"Bring to front\",\"sendBackward\":\"Send backward\",\"delete\":\"Delete\",\"copyStyles\":\"Copy styles\",\"pasteStyles\":\"Paste styles\",\"stroke\":\"Stroke\",\"background\":\"Background\",\"fill\":\"Fill\",\"strokeWidth\":\"Stroke width\",\"strokeStyle\":\"Stroke style\",\"strokeStyle_solid\":\"Solid\",\"strokeStyle_dashed\":\"Dashed\",\"strokeStyle_dotted\":\"Dotted\",\"sloppiness\":\"Sloppiness\",\"opacity\":\"Opacity\",\"textAlign\":\"Text align\",\"edges\":\"Edges\",\"sharp\":\"Sharp\",\"round\":\"Round\",\"arrowheads\":\"Arrowheads\",\"arrowhead_none\":\"None\",\"arrowhead_arrow\":\"Arrow\",\"arrowhead_bar\":\"Bar\",\"arrowhead_dot\":\"Dot\",\"arrowhead_triangle\":\"Triangle\",\"fontSize\":\"Font size\",\"fontFamily\":\"Font family\",\"addWatermark\":\"Add \\\\\"Made with Excalidraw\\\\\"\",\"handDrawn\":\"Hand-drawn\",\"normal\":\"Normal\",\"code\":\"Code\",\"localFont\":\"Local Font\",\"small\":\"Small\",\"medium\":\"Medium\",\"large\":\"Large\",\"veryLarge\":\"Very large\",\"solid\":\"Solid\",\"hachure\":\"Hachure\",\"zigzag\":\"Zigzag\",\"crossHatch\":\"Cross-hatch\",\"extraThin\":\"Extra thin\",\"thin\":\"Thin\",\"bold\":\"Bold\",\"left\":\"Left\",\"center\":\"Center\",\"right\":\"Right\",\"extraBold\":\"Extra bold\",\"architect\":\"Architect\",\"artist\":\"Artist\",\"cartoonist\":\"Cartoonist\",\"fileTitle\":\"File name\",\"colorPicker\":\"Color picker\",\"canvasColors\":\"Used on canvas\",\"canvasBackground\":\"Canvas background\",\"drawingCanvas\":\"Drawing canvas\",\"layers\":\"Layers\",\"actions\":\"Actions\",\"language\":\"Language\",\"liveCollaboration\":\"Live collaboration...\",\"duplicateSelection\":\"Duplicate\",\"untitled\":\"Untitled\",\"name\":\"Name\",\"yourName\":\"Your name\",\"madeWithExcalidraw\":\"Made with Excalidraw\",\"group\":\"Group selection\",\"ungroup\":\"Ungroup selection\",\"collaborators\":\"Collaborators\",\"showGrid\":\"Show grid\",\"addToLibrary\":\"Add to library\",\"removeFromLibrary\":\"Remove from library\",\"libraryLoadingMessage\":\"Loading library…\",\"libraries\":\"Browse libraries\",\"loadingScene\":\"Loading scene…\",\"align\":\"Align\",\"alignTop\":\"Align top\",\"alignBottom\":\"Align bottom\",\"alignLeft\":\"Align left\",\"alignRight\":\"Align right\",\"centerVertically\":\"Center vertically\",\"centerHorizontally\":\"Center horizontally\",\"distributeHorizontally\":\"Distribute horizontally\",\"distributeVertically\":\"Distribute vertically\",\"flipHorizontal\":\"Flip horizontal\",\"flipVertical\":\"Flip vertical\",\"viewMode\":\"View mode\",\"share\":\"Share\",\"showStroke\":\"Show stroke color picker\",\"showBackground\":\"Show background color picker\",\"toggleTheme\":\"Toggle theme\",\"personalLib\":\"Personal Library\",\"excalidrawLib\":\"Excalidraw Library\",\"decreaseFontSize\":\"Decrease font size\",\"increaseFontSize\":\"Increase font size\",\"unbindText\":\"Unbind text\",\"bindText\":\"Bind text to the container\",\"createContainerFromText\":\"Wrap text in a container\",\"link\":{\"edit\":\"Edit link\",\"editEmbed\":\"Edit link & embed\",\"create\":\"Create link\",\"createEmbed\":\"Create link & embed\",\"label\":\"Link\",\"labelEmbed\":\"Link & embed\",\"empty\":\"No link is set\"},\"lineEditor\":{\"edit\":\"Edit line\",\"exit\":\"Exit line editor\"},\"elementLock\":{\"lock\":\"Lock\",\"unlock\":\"Unlock\",\"lockAll\":\"Lock all\",\"unlockAll\":\"Unlock all\"},\"statusPublished\":\"Published\",\"sidebarLock\":\"Keep sidebar open\",\"selectAllElementsInFrame\":\"Select all elements in frame\",\"removeAllElementsFromFrame\":\"Remove all elements from frame\",\"eyeDropper\":\"Pick color from canvas\"},\"library\":{\"noItems\":\"No items added yet...\",\"hint_emptyLibrary\":\"Select an item on canvas to add it here, or install a library from the public repository, below.\",\"hint_emptyPrivateLibrary\":\"Select an item on canvas to add it here.\"},\"buttons\":{\"clearReset\":\"Reset the canvas\",\"exportJSON\":\"Export to file\",\"exportImage\":\"Export image...\",\"export\":\"Save to...\",\"copyToClipboard\":\"Copy to clipboard\",\"save\":\"Save to current file\",\"saveAs\":\"Save as\",\"load\":\"Open\",\"getShareableLink\":\"Get shareable link\",\"close\":\"Close\",\"selectLanguage\":\"Select language\",\"scrollBackToContent\":\"Scroll back to content\",\"zoomIn\":\"Zoom in\",\"zoomOut\":\"Zoom out\",\"resetZoom\":\"Reset zoom\",\"menu\":\"Menu\",\"done\":\"Done\",\"edit\":\"Edit\",\"undo\":\"Undo\",\"redo\":\"Redo\",\"resetLibrary\":\"Reset library\",\"createNewRoom\":\"Create new room\",\"fullScreen\":\"Full screen\",\"darkMode\":\"Dark mode\",\"lightMode\":\"Light mode\",\"zenMode\":\"Zen mode\",\"objectsSnapMode\":\"Snap to objects\",\"exitZenMode\":\"Exit zen mode\",\"cancel\":\"Cancel\",\"clear\":\"Clear\",\"remove\":\"Remove\",\"embed\":\"Toggle embedding\",\"publishLibrary\":\"Publish\",\"submit\":\"Submit\",\"confirm\":\"Confirm\",\"embeddableInteractionButton\":\"Click to interact\"},\"alerts\":{\"clearReset\":\"This will clear the whole canvas. Are you sure?\",\"couldNotCreateShareableLink\":\"Couldn\\'t create shareable link.\",\"couldNotCreateShareableLinkTooBig\":\"Couldn\\'t create shareable link: the scene is too big\",\"couldNotLoadInvalidFile\":\"Couldn\\'t load invalid file\",\"importBackendFailed\":\"Importing from backend failed.\",\"cannotExportEmptyCanvas\":\"Cannot export empty canvas.\",\"couldNotCopyToClipboard\":\"Couldn\\'t copy to clipboard.\",\"decryptFailed\":\"Couldn\\'t decrypt data.\",\"uploadedSecurly\":\"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can\\'t read the content.\",\"loadSceneOverridePrompt\":\"Loading external drawing will replace your existing content. Do you wish to continue?\",\"collabStopOverridePrompt\":\"Stopping the session will overwrite your previous, locally stored drawing. Are you sure?\\\\n\\\\n(If you want to keep your local drawing, simply close the browser tab instead.)\",\"errorAddingToLibrary\":\"Couldn\\'t add item to the library\",\"errorRemovingFromLibrary\":\"Couldn\\'t remove item from the library\",\"confirmAddLibrary\":\"This will add {{numShapes}} shape(s) to your library. Are you sure?\",\"imageDoesNotContainScene\":\"This image does not seem to contain any scene data. Have you enabled scene embedding during export?\",\"cannotRestoreFromImage\":\"Scene couldn\\'t be restored from this image file\",\"invalidSceneUrl\":\"Couldn\\'t import scene from the supplied URL. It\\'s either malformed, or doesn\\'t contain valid Excalidraw JSON data.\",\"resetLibrary\":\"This will clear your library. Are you sure?\",\"removeItemsFromsLibrary\":\"Delete {{count}} item(s) from library?\",\"invalidEncryptionKey\":\"Encryption key must be of 22 characters. Live collaboration is disabled.\",\"collabOfflineWarning\":\"No internet connection available.\\\\nYour changes will not be saved!\"},\"errors\":{\"unsupportedFileType\":\"Unsupported file type.\",\"imageInsertError\":\"Couldn\\'t insert image. Try again later...\",\"fileTooBig\":\"File is too big. Maximum allowed size is {{maxSize}}.\",\"svgImageInsertError\":\"Couldn\\'t insert SVG image. The SVG markup looks invalid.\",\"invalidSVGString\":\"Invalid SVG.\",\"cannotResolveCollabServer\":\"Couldn\\'t connect to the collab server. Please reload the page and try again.\",\"importLibraryError\":\"Couldn\\'t load library\",\"collabSaveFailed\":\"Couldn\\'t save to the backend database. If problems persist, you should save your file locally to ensure you don\\'t lose your work.\",\"collabSaveFailed_sizeExceeded\":\"Couldn\\'t save to the backend database, the canvas seems to be too big. You should save the file locally to ensure you don\\'t lose your work.\",\"brave_measure_text_error\":{\"line1\":\"Looks like you are using Brave browser with the <bold>Aggressively Block Fingerprinting</bold> setting enabled.\",\"line2\":\"This could result in breaking the <bold>Text Elements</bold> in your drawings.\",\"line3\":\"We strongly recommend disabling this setting. You can follow <link>these steps</link> on how to do so.\",\"line4\":\"If disabling this setting doesn\\'t fix the display of text elements, please open an <issueLink>issue</issueLink> on our GitHub, or write us on <discordLink>Discord</discordLink>\"},\"libraryElementTypeError\":{\"embeddable\":\"Embeddable elements cannot be added to the library.\",\"image\":\"Support for adding images to the library coming soon!\"}},\"toolBar\":{\"selection\":\"Selection\",\"image\":\"Insert image\",\"rectangle\":\"Rectangle\",\"diamond\":\"Diamond\",\"ellipse\":\"Ellipse\",\"arrow\":\"Arrow\",\"line\":\"Line\",\"freedraw\":\"Draw\",\"text\":\"Text\",\"library\":\"Library\",\"lock\":\"Keep selected tool active after drawing\",\"penMode\":\"Pen mode - prevent touch\",\"link\":\"Add/ Update link for a selected shape\",\"eraser\":\"Eraser\",\"frame\":\"Frame tool\",\"embeddable\":\"Web Embed\",\"hand\":\"Hand (panning tool)\",\"extraTools\":\"More tools\",\"mermaidToExcalidraw\":\"Mermaid to Excalidraw\"},\"headings\":{\"canvasActions\":\"Canvas actions\",\"selectedShapeActions\":\"Selected shape actions\",\"shapes\":\"Shapes\"},\"hints\":{\"canvasPanning\":\"To move canvas, hold mouse wheel or spacebar while dragging, or use the hand tool\",\"linearElement\":\"Click to start multiple points, drag for single line\",\"freeDraw\":\"Click and drag, release when you\\'re finished\",\"text\":\"Tip: you can also add text by double-clicking anywhere with the selection tool\",\"embeddable\":\"Click-drag to create a website embed\",\"text_selected\":\"Double-click or press ENTER to edit text\",\"text_editing\":\"Press Escape or CtrlOrCmd+ENTER to finish editing\",\"linearElementMulti\":\"Click on last point or press Escape or Enter to finish\",\"lockAngle\":\"You can constrain angle by holding SHIFT\",\"resize\":\"You can constrain proportions by holding SHIFT while resizing,\\\\nhold ALT to resize from the center\",\"resizeImage\":\"You can resize freely by holding SHIFT,\\\\nhold ALT to resize from the center\",\"rotate\":\"You can constrain angles by holding SHIFT while rotating\",\"lineEditor_info\":\"Hold CtrlOrCmd and Double-click or press CtrlOrCmd + Enter to edit points\",\"lineEditor_pointSelected\":\"Press Delete to remove point(s),\\\\nCtrlOrCmd+D to duplicate, or drag to move\",\"lineEditor_nothingSelected\":\"Select a point to edit (hold SHIFT to select multiple),\\\\nor hold Alt and click to add new points\",\"placeImage\":\"Click to place the image, or click and drag to set its size manually\",\"publishLibrary\":\"Publish your own library\",\"bindTextToElement\":\"Press enter to add text\",\"deepBoxSelect\":\"Hold CtrlOrCmd to deep select, and to prevent dragging\",\"eraserRevert\":\"Hold Alt to revert the elements marked for deletion\",\"firefox_clipboard_write\":\"This feature can likely be enabled by setting the \\\\\"dom.events.asyncClipboard.clipboardItem\\\\\" flag to \\\\\"true\\\\\". To change the browser flags in Firefox, visit the \\\\\"about:config\\\\\" page.\",\"disableSnapping\":\"Hold CtrlOrCmd to disable snapping\"},\"canvasError\":{\"cannotShowPreview\":\"Cannot show preview\",\"canvasTooBig\":\"The canvas may be too big.\",\"canvasTooBigTip\":\"Tip: try moving the farthest elements a bit closer together.\"},\"errorSplash\":{\"headingMain\":\"Encountered an error. Try <button>reloading the page</button>.\",\"clearCanvasMessage\":\"If reloading doesn\\'t work, try <button>clearing the canvas</button>.\",\"clearCanvasCaveat\":\" This will result in loss of work \",\"trackedToSentry\":\"The error with identifier {{eventId}} was tracked on our system.\",\"openIssueMessage\":\"We were very cautious not to include your scene information on the error. If your scene is not private, please consider following up on our <button>bug tracker</button>. Please include information below by copying and pasting into the GitHub issue.\",\"sceneContent\":\"Scene content:\"},\"roomDialog\":{\"desc_intro\":\"You can invite people to your current scene to collaborate with you.\",\"desc_privacy\":\"Don\\'t worry, the session uses end-to-end encryption, so whatever you draw will stay private. Not even our server will be able to see what you come up with.\",\"button_startSession\":\"Start session\",\"button_stopSession\":\"Stop session\",\"desc_inProgressIntro\":\"Live-collaboration session is now in progress.\",\"desc_shareLink\":\"Share this link with anyone you want to collaborate with:\",\"desc_exitSession\":\"Stopping the session will disconnect you from the room, but you\\'ll be able to continue working with the scene, locally. Note that this won\\'t affect other people, and they\\'ll still be able to collaborate on their version.\",\"shareTitle\":\"Join a live collaboration session on Excalidraw\"},\"errorDialog\":{\"title\":\"Error\"},\"exportDialog\":{\"disk_title\":\"Save to disk\",\"disk_details\":\"Export the scene data to a file from which you can import later.\",\"disk_button\":\"Save to file\",\"link_title\":\"Shareable link\",\"link_details\":\"Export as a read-only link.\",\"link_button\":\"Export to Link\",\"excalidrawplus_description\":\"Save the scene to your Excalidraw+ workspace.\",\"excalidrawplus_button\":\"Export\",\"excalidrawplus_exportError\":\"Couldn\\'t export to Excalidraw+ at this moment...\"},\"helpDialog\":{\"blog\":\"Read our blog\",\"click\":\"click\",\"deepSelect\":\"Deep select\",\"deepBoxSelect\":\"Deep select within box, and prevent dragging\",\"curvedArrow\":\"Curved arrow\",\"curvedLine\":\"Curved line\",\"documentation\":\"Documentation\",\"doubleClick\":\"double-click\",\"drag\":\"drag\",\"editor\":\"Editor\",\"editLineArrowPoints\":\"Edit line/arrow points\",\"editText\":\"Edit text / add label\",\"github\":\"Found an issue? Submit\",\"howto\":\"Follow our guides\",\"or\":\"or\",\"preventBinding\":\"Prevent arrow binding\",\"tools\":\"Tools\",\"shortcuts\":\"Keyboard shortcuts\",\"textFinish\":\"Finish editing (text editor)\",\"textNewLine\":\"Add new line (text editor)\",\"title\":\"Help\",\"view\":\"View\",\"zoomToFit\":\"Zoom to fit all elements\",\"zoomToSelection\":\"Zoom to selection\",\"toggleElementLock\":\"Lock/unlock selection\",\"movePageUpDown\":\"Move page up/down\",\"movePageLeftRight\":\"Move page left/right\"},\"clearCanvasDialog\":{\"title\":\"Clear canvas\"},\"publishDialog\":{\"title\":\"Publish library\",\"itemName\":\"Item name\",\"authorName\":\"Author name\",\"githubUsername\":\"GitHub username\",\"twitterUsername\":\"Twitter username\",\"libraryName\":\"Library name\",\"libraryDesc\":\"Library description\",\"website\":\"Website\",\"placeholder\":{\"authorName\":\"Your name or username\",\"libraryName\":\"Name of your library\",\"libraryDesc\":\"Description of your library to help people understand its usage\",\"githubHandle\":\"GitHub handle (optional), so you can edit the library once submitted for review\",\"twitterHandle\":\"Twitter username (optional), so we know who to credit when promoting over Twitter\",\"website\":\"Link to your personal website or elsewhere (optional)\"},\"errors\":{\"required\":\"Required\",\"website\":\"Enter a valid URL\"},\"noteDescription\":\"Submit your library to be included in the <link>public library repository</link> for other people to use in their drawings.\",\"noteGuidelines\":\"The library needs to be manually approved first. Please read the <link>guidelines</link> before submitting. You will need a GitHub account to communicate and make changes if requested, but it is not strictly required.\",\"noteLicense\":\"By submitting, you agree the library will be published under the <link>MIT License</link>, which in short means anyone can use them without restrictions.\",\"noteItems\":\"Each library item must have its own name so it\\'s filterable. The following library items will be included:\",\"atleastOneLibItem\":\"Please select at least one library item to get started\",\"republishWarning\":\"Note: some of the selected items are marked as already published/submitted. You should only resubmit items when updating an existing library or submission.\"},\"publishSuccessDialog\":{\"title\":\"Library submitted\",\"content\":\"Thank you {{authorName}}. Your library has been submitted for review. You can track the status <link>here</link>\"},\"confirmDialog\":{\"resetLibrary\":\"Reset library\",\"removeItemsFromLib\":\"Remove selected items from library\"},\"imageExportDialog\":{\"header\":\"Export image\",\"label\":{\"withBackground\":\"Background\",\"onlySelected\":\"Only selected\",\"darkMode\":\"Dark mode\",\"embedScene\":\"Embed scene\",\"scale\":\"Scale\",\"padding\":\"Padding\"},\"tooltip\":{\"embedScene\":\"Scene data will be saved into the exported PNG/SVG file so that the scene can be restored from it.\\\\nWill increase exported file size.\"},\"title\":{\"exportToPng\":\"Export to PNG\",\"exportToSvg\":\"Export to SVG\",\"copyPngToClipboard\":\"Copy PNG to clipboard\"},\"button\":{\"exportToPng\":\"PNG\",\"exportToSvg\":\"SVG\",\"copyPngToClipboard\":\"Copy to clipboard\"}},\"encrypted\":{\"tooltip\":\"Your drawings are end-to-end encrypted so Excalidraw\\'s servers will never see them.\",\"link\":\"Blog post on end-to-end encryption in Excalidraw\"},\"stats\":{\"angle\":\"Angle\",\"element\":\"Element\",\"elements\":\"Elements\",\"height\":\"Height\",\"scene\":\"Scene\",\"selected\":\"Selected\",\"storage\":\"Storage\",\"title\":\"Stats for nerds\",\"total\":\"Total\",\"version\":\"Version\",\"versionCopy\":\"Click to copy\",\"versionNotAvailable\":\"Version not available\",\"width\":\"Width\"},\"toast\":{\"addedToLibrary\":\"Added to library\",\"copyStyles\":\"Copied styles.\",\"copyToClipboard\":\"Copied to clipboard.\",\"copyToClipboardAsPng\":\"Copied {{exportSelection}} to clipboard as PNG\\\\n({{exportColorScheme}})\",\"fileSaved\":\"File saved.\",\"fileSavedToFilename\":\"Saved to {filename}\",\"canvas\":\"canvas\",\"selection\":\"selection\",\"pasteAsSingleElement\":\"Use {{shortcut}} to paste as a single element,\\\\nor paste into an existing text editor\",\"unableToEmbed\":\"Embedding this url is currently not allowed. Raise an issue on GitHub to request the url whitelisted\",\"unrecognizedLinkFormat\":\"The link you embedded does not match the expected format. Please try to paste the \\'embed\\' string provided by the source site\"},\"colors\":{\"transparent\":\"Transparent\",\"black\":\"Black\",\"white\":\"White\",\"red\":\"Red\",\"pink\":\"Pink\",\"grape\":\"Grape\",\"violet\":\"Violet\",\"gray\":\"Gray\",\"blue\":\"Blue\",\"cyan\":\"Cyan\",\"teal\":\"Teal\",\"green\":\"Green\",\"yellow\":\"Yellow\",\"orange\":\"Orange\",\"bronze\":\"Bronze\"},\"welcomeScreen\":{\"app\":{\"center_heading\":\"All your data is saved locally in your browser.\",\"center_heading_plus\":\"Did you want to go to the Excalidraw+ instead?\",\"menuHint\":\"Export, preferences, languages, ...\"},\"defaults\":{\"menuHint\":\"Export, preferences, and more...\",\"center_heading\":\"Diagrams. Made. Simple.\",\"toolbarHint\":\"Pick a tool & Start drawing!\",\"helpHint\":\"Shortcuts & help\"}},\"colorPicker\":{\"mostUsedCustomColors\":\"Most used custom colors\",\"colors\":\"Colors\",\"shades\":\"Shades\",\"hexCode\":\"Hex code\",\"noShades\":\"No shades available for this color\"},\"overwriteConfirm\":{\"action\":{\"exportToImage\":{\"title\":\"Export as image\",\"button\":\"Export as image\",\"description\":\"Export the scene data as an image from which you can import later.\"},\"saveToDisk\":{\"title\":\"Save to disk\",\"button\":\"Save to disk\",\"description\":\"Export the scene data to a file from which you can import later.\"},\"excalidrawPlus\":{\"title\":\"Excalidraw+\",\"button\":\"Export to Excalidraw+\",\"description\":\"Save the scene to your Excalidraw+ workspace.\"}},\"modal\":{\"loadFromFile\":{\"title\":\"Load from file\",\"button\":\"Load from file\",\"description\":\"Loading from a file will <bold>replace your existing content</bold>.<br></br>You can back up your drawing first using one of the options below.\"},\"shareableLink\":{\"title\":\"Load from link\",\"button\":\"Replace my content\",\"description\":\"Loading external drawing will <bold>replace your existing content</bold>.<br></br>You can back up your drawing first by using one of the options below.\"}}},\"mermaid\":{\"title\":\"Mermaid to Excalidraw\",\"button\":\"Insert\",\"description\":\"Currently only <flowchartLink>flowcharts</flowchartLink> are supported. The other types will be rendered as image in Excalidraw.\",\"syntax\":\"Mermaid Syntax\",\"preview\":\"Preview\"}}');\n\n//# sourceURL=webpack://ExcalidrawLib/../../locales/en.json?");
5639
+ eval("module.exports = JSON.parse('{\"labels\":{\"laser\":\"Toggle laser pointer\",\"paste\":\"Paste\",\"pasteAsPlaintext\":\"Paste as plaintext\",\"pasteCharts\":\"Paste charts\",\"selectAll\":\"Select all\",\"multiSelect\":\"Add element to selection\",\"moveCanvas\":\"Move canvas\",\"cut\":\"Cut\",\"copy\":\"Copy\",\"copyAsPng\":\"Copy to clipboard as PNG\",\"copyAsSvg\":\"Copy to clipboard as SVG\",\"copyText\":\"Copy to clipboard as text\",\"bringForward\":\"Bring forward\",\"sendToBack\":\"Send to back\",\"bringToFront\":\"Bring to front\",\"sendBackward\":\"Send backward\",\"delete\":\"Delete\",\"copyStyles\":\"Copy styles\",\"pasteStyles\":\"Paste styles\",\"stroke\":\"Stroke\",\"background\":\"Background\",\"fill\":\"Fill\",\"strokeWidth\":\"Stroke width\",\"strokeStyle\":\"Stroke style\",\"strokeStyle_solid\":\"Solid\",\"strokeStyle_dashed\":\"Dashed\",\"strokeStyle_dotted\":\"Dotted\",\"sloppiness\":\"Sloppiness\",\"opacity\":\"Opacity\",\"textAlign\":\"Text align\",\"edges\":\"Edges\",\"sharp\":\"Sharp\",\"round\":\"Round\",\"arrowheads\":\"Arrowheads\",\"arrowhead_none\":\"None\",\"arrowhead_arrow\":\"Arrow\",\"arrowhead_bar\":\"Bar\",\"arrowhead_dot\":\"Dot\",\"arrowhead_triangle\":\"Triangle\",\"fontSize\":\"Font size\",\"fontFamily\":\"Font family\",\"addWatermark\":\"Add \\\\\"Made with Excalidraw\\\\\"\",\"handDrawn\":\"Hand-drawn\",\"normal\":\"Normal\",\"code\":\"Code\",\"localFont\":\"Local Font\",\"small\":\"Small\",\"medium\":\"Medium\",\"large\":\"Large\",\"veryLarge\":\"Very large\",\"solid\":\"Solid\",\"hachure\":\"Hachure\",\"zigzag\":\"Zigzag\",\"crossHatch\":\"Cross-hatch\",\"extraThin\":\"Extra thin\",\"thin\":\"Thin\",\"bold\":\"Bold\",\"left\":\"Left\",\"center\":\"Center\",\"right\":\"Right\",\"extraBold\":\"Extra bold\",\"architect\":\"Architect\",\"artist\":\"Artist\",\"cartoonist\":\"Cartoonist\",\"fileTitle\":\"File name\",\"colorPicker\":\"Color picker\",\"canvasColors\":\"Used on canvas\",\"canvasBackground\":\"Canvas background\",\"drawingCanvas\":\"Drawing canvas\",\"layers\":\"Layers\",\"actions\":\"Actions\",\"language\":\"Language\",\"liveCollaboration\":\"Live collaboration...\",\"duplicateSelection\":\"Duplicate\",\"untitled\":\"Untitled\",\"name\":\"Name\",\"yourName\":\"Your name\",\"madeWithExcalidraw\":\"Made with Excalidraw\",\"group\":\"Group selection\",\"ungroup\":\"Ungroup selection\",\"collaborators\":\"Collaborators\",\"showGrid\":\"Show grid\",\"addToLibrary\":\"Add to library\",\"removeFromLibrary\":\"Remove from library\",\"libraryLoadingMessage\":\"Loading library…\",\"libraries\":\"Browse libraries\",\"loadingScene\":\"Loading scene…\",\"align\":\"Align\",\"alignTop\":\"Align top\",\"alignBottom\":\"Align bottom\",\"alignLeft\":\"Align left\",\"alignRight\":\"Align right\",\"centerVertically\":\"Center vertically\",\"centerHorizontally\":\"Center horizontally\",\"distributeHorizontally\":\"Distribute horizontally\",\"distributeVertically\":\"Distribute vertically\",\"flipHorizontal\":\"Flip horizontal\",\"flipVertical\":\"Flip vertical\",\"viewMode\":\"View mode\",\"share\":\"Share\",\"showStroke\":\"Show stroke color picker\",\"showBackground\":\"Show background color picker\",\"toggleTheme\":\"Toggle theme\",\"personalLib\":\"Personal Library\",\"excalidrawLib\":\"Excalidraw Library\",\"decreaseFontSize\":\"Decrease font size\",\"increaseFontSize\":\"Increase font size\",\"unbindText\":\"Unbind text\",\"bindText\":\"Bind text to the container\",\"createContainerFromText\":\"Wrap text in a container\",\"link\":{\"edit\":\"Edit link\",\"editEmbed\":\"Edit link & embed\",\"create\":\"Create link\",\"createEmbed\":\"Create link & embed\",\"label\":\"Link\",\"labelEmbed\":\"Link & embed\",\"empty\":\"No link is set\"},\"lineEditor\":{\"edit\":\"Edit line\",\"exit\":\"Exit line editor\"},\"elementLock\":{\"lock\":\"Lock\",\"unlock\":\"Unlock\",\"lockAll\":\"Lock all\",\"unlockAll\":\"Unlock all\"},\"statusPublished\":\"Published\",\"sidebarLock\":\"Keep sidebar open\",\"selectAllElementsInFrame\":\"Select all elements in frame\",\"removeAllElementsFromFrame\":\"Remove all elements from frame\",\"eyeDropper\":\"Pick color from canvas\"},\"library\":{\"noItems\":\"No items added yet...\",\"hint_emptyLibrary\":\"Select an item on canvas to add it here, or install a library from the public repository, below.\",\"hint_emptyPrivateLibrary\":\"Select an item on canvas to add it here.\"},\"buttons\":{\"clearReset\":\"Reset the canvas\",\"exportJSON\":\"Export to file\",\"exportImage\":\"Export image...\",\"export\":\"Save to...\",\"copyToClipboard\":\"Copy to clipboard\",\"save\":\"Save to current file\",\"saveAs\":\"Save as\",\"load\":\"Open\",\"getShareableLink\":\"Get shareable link\",\"close\":\"Close\",\"selectLanguage\":\"Select language\",\"scrollBackToContent\":\"Scroll back to content\",\"zoomIn\":\"Zoom in\",\"zoomOut\":\"Zoom out\",\"resetZoom\":\"Reset zoom\",\"menu\":\"Menu\",\"done\":\"Done\",\"edit\":\"Edit\",\"undo\":\"Undo\",\"redo\":\"Redo\",\"resetLibrary\":\"Reset library\",\"createNewRoom\":\"Create new room\",\"fullScreen\":\"Full screen\",\"darkMode\":\"Dark mode\",\"lightMode\":\"Light mode\",\"zenMode\":\"Zen mode\",\"objectsSnapMode\":\"Snap to objects\",\"exitZenMode\":\"Exit zen mode\",\"cancel\":\"Cancel\",\"clear\":\"Clear\",\"remove\":\"Remove\",\"embed\":\"Toggle embedding\",\"publishLibrary\":\"Publish\",\"submit\":\"Submit\",\"confirm\":\"Confirm\",\"embeddableInteractionButton\":\"Click to interact\"},\"alerts\":{\"clearReset\":\"This will clear the whole canvas. Are you sure?\",\"couldNotCreateShareableLink\":\"Couldn\\'t create shareable link.\",\"couldNotCreateShareableLinkTooBig\":\"Couldn\\'t create shareable link: the scene is too big\",\"couldNotLoadInvalidFile\":\"Couldn\\'t load invalid file\",\"importBackendFailed\":\"Importing from backend failed.\",\"cannotExportEmptyCanvas\":\"Cannot export empty canvas.\",\"couldNotCopyToClipboard\":\"Couldn\\'t copy to clipboard.\",\"decryptFailed\":\"Couldn\\'t decrypt data.\",\"uploadedSecurly\":\"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can\\'t read the content.\",\"loadSceneOverridePrompt\":\"Loading external drawing will replace your existing content. Do you wish to continue?\",\"collabStopOverridePrompt\":\"Stopping the session will overwrite your previous, locally stored drawing. Are you sure?\\\\n\\\\n(If you want to keep your local drawing, simply close the browser tab instead.)\",\"errorAddingToLibrary\":\"Couldn\\'t add item to the library\",\"errorRemovingFromLibrary\":\"Couldn\\'t remove item from the library\",\"confirmAddLibrary\":\"This will add {{numShapes}} shape(s) to your library. Are you sure?\",\"imageDoesNotContainScene\":\"This image does not seem to contain any scene data. Have you enabled scene embedding during export?\",\"cannotRestoreFromImage\":\"Scene couldn\\'t be restored from this image file\",\"invalidSceneUrl\":\"Couldn\\'t import scene from the supplied URL. It\\'s either malformed, or doesn\\'t contain valid Excalidraw JSON data.\",\"resetLibrary\":\"This will clear your library. Are you sure?\",\"removeItemsFromsLibrary\":\"Delete {{count}} item(s) from library?\",\"invalidEncryptionKey\":\"Encryption key must be of 22 characters. Live collaboration is disabled.\",\"collabOfflineWarning\":\"No internet connection available.\\\\nYour changes will not be saved!\"},\"errors\":{\"unsupportedFileType\":\"Unsupported file type.\",\"imageInsertError\":\"Couldn\\'t insert image. Try again later...\",\"fileTooBig\":\"File is too big. Maximum allowed size is {{maxSize}}.\",\"svgImageInsertError\":\"Couldn\\'t insert SVG image. The SVG markup looks invalid.\",\"invalidSVGString\":\"Invalid SVG.\",\"cannotResolveCollabServer\":\"Couldn\\'t connect to the collab server. Please reload the page and try again.\",\"importLibraryError\":\"Couldn\\'t load library\",\"collabSaveFailed\":\"Couldn\\'t save to the backend database. If problems persist, you should save your file locally to ensure you don\\'t lose your work.\",\"collabSaveFailed_sizeExceeded\":\"Couldn\\'t save to the backend database, the canvas seems to be too big. You should save the file locally to ensure you don\\'t lose your work.\",\"brave_measure_text_error\":{\"line1\":\"Looks like you are using Brave browser with the <bold>Aggressively Block Fingerprinting</bold> setting enabled.\",\"line2\":\"This could result in breaking the <bold>Text Elements</bold> in your drawings.\",\"line3\":\"We strongly recommend disabling this setting. You can follow <link>these steps</link> on how to do so.\",\"line4\":\"If disabling this setting doesn\\'t fix the display of text elements, please open an <issueLink>issue</issueLink> on our GitHub, or write us on <discordLink>Discord</discordLink>\"},\"libraryElementTypeError\":{\"embeddable\":\"Embeddable elements cannot be added to the library.\",\"image\":\"Support for adding images to the library coming soon!\"}},\"toolBar\":{\"selection\":\"Selection\",\"image\":\"Insert image\",\"rectangle\":\"Rectangle\",\"diamond\":\"Diamond\",\"ellipse\":\"Ellipse\",\"arrow\":\"Arrow\",\"line\":\"Line\",\"freedraw\":\"Draw\",\"text\":\"Text\",\"library\":\"Library\",\"lock\":\"Keep selected tool active after drawing\",\"penMode\":\"Pen mode - prevent touch\",\"link\":\"Add/ Update link for a selected shape\",\"eraser\":\"Eraser\",\"frame\":\"Frame tool\",\"embeddable\":\"Web Embed\",\"laser\":\"Laser pointer\",\"hand\":\"Hand (panning tool)\",\"extraTools\":\"More tools\",\"mermaidToExcalidraw\":\"Mermaid to Excalidraw\"},\"headings\":{\"canvasActions\":\"Canvas actions\",\"selectedShapeActions\":\"Selected shape actions\",\"shapes\":\"Shapes\"},\"hints\":{\"canvasPanning\":\"To move canvas, hold mouse wheel or spacebar while dragging, or use the hand tool\",\"linearElement\":\"Click to start multiple points, drag for single line\",\"freeDraw\":\"Click and drag, release when you\\'re finished\",\"text\":\"Tip: you can also add text by double-clicking anywhere with the selection tool\",\"embeddable\":\"Click-drag to create a website embed\",\"text_selected\":\"Double-click or press ENTER to edit text\",\"text_editing\":\"Press Escape or CtrlOrCmd+ENTER to finish editing\",\"linearElementMulti\":\"Click on last point or press Escape or Enter to finish\",\"lockAngle\":\"You can constrain angle by holding SHIFT\",\"resize\":\"You can constrain proportions by holding SHIFT while resizing,\\\\nhold ALT to resize from the center\",\"resizeImage\":\"You can resize freely by holding SHIFT,\\\\nhold ALT to resize from the center\",\"rotate\":\"You can constrain angles by holding SHIFT while rotating\",\"lineEditor_info\":\"Hold CtrlOrCmd and Double-click or press CtrlOrCmd + Enter to edit points\",\"lineEditor_pointSelected\":\"Press Delete to remove point(s),\\\\nCtrlOrCmd+D to duplicate, or drag to move\",\"lineEditor_nothingSelected\":\"Select a point to edit (hold SHIFT to select multiple),\\\\nor hold Alt and click to add new points\",\"placeImage\":\"Click to place the image, or click and drag to set its size manually\",\"publishLibrary\":\"Publish your own library\",\"bindTextToElement\":\"Press enter to add text\",\"deepBoxSelect\":\"Hold CtrlOrCmd to deep select, and to prevent dragging\",\"eraserRevert\":\"Hold Alt to revert the elements marked for deletion\",\"firefox_clipboard_write\":\"This feature can likely be enabled by setting the \\\\\"dom.events.asyncClipboard.clipboardItem\\\\\" flag to \\\\\"true\\\\\". To change the browser flags in Firefox, visit the \\\\\"about:config\\\\\" page.\",\"disableSnapping\":\"Hold CtrlOrCmd to disable snapping\"},\"canvasError\":{\"cannotShowPreview\":\"Cannot show preview\",\"canvasTooBig\":\"The canvas may be too big.\",\"canvasTooBigTip\":\"Tip: try moving the farthest elements a bit closer together.\"},\"errorSplash\":{\"headingMain\":\"Encountered an error. Try <button>reloading the page</button>.\",\"clearCanvasMessage\":\"If reloading doesn\\'t work, try <button>clearing the canvas</button>.\",\"clearCanvasCaveat\":\" This will result in loss of work \",\"trackedToSentry\":\"The error with identifier {{eventId}} was tracked on our system.\",\"openIssueMessage\":\"We were very cautious not to include your scene information on the error. If your scene is not private, please consider following up on our <button>bug tracker</button>. Please include information below by copying and pasting into the GitHub issue.\",\"sceneContent\":\"Scene content:\"},\"roomDialog\":{\"desc_intro\":\"You can invite people to your current scene to collaborate with you.\",\"desc_privacy\":\"Don\\'t worry, the session uses end-to-end encryption, so whatever you draw will stay private. Not even our server will be able to see what you come up with.\",\"button_startSession\":\"Start session\",\"button_stopSession\":\"Stop session\",\"desc_inProgressIntro\":\"Live-collaboration session is now in progress.\",\"desc_shareLink\":\"Share this link with anyone you want to collaborate with:\",\"desc_exitSession\":\"Stopping the session will disconnect you from the room, but you\\'ll be able to continue working with the scene, locally. Note that this won\\'t affect other people, and they\\'ll still be able to collaborate on their version.\",\"shareTitle\":\"Join a live collaboration session on Excalidraw\"},\"errorDialog\":{\"title\":\"Error\"},\"exportDialog\":{\"disk_title\":\"Save to disk\",\"disk_details\":\"Export the scene data to a file from which you can import later.\",\"disk_button\":\"Save to file\",\"link_title\":\"Shareable link\",\"link_details\":\"Export as a read-only link.\",\"link_button\":\"Export to Link\",\"excalidrawplus_description\":\"Save the scene to your Excalidraw+ workspace.\",\"excalidrawplus_button\":\"Export\",\"excalidrawplus_exportError\":\"Couldn\\'t export to Excalidraw+ at this moment...\"},\"helpDialog\":{\"blog\":\"Read our blog\",\"click\":\"click\",\"deepSelect\":\"Deep select\",\"deepBoxSelect\":\"Deep select within box, and prevent dragging\",\"curvedArrow\":\"Curved arrow\",\"curvedLine\":\"Curved line\",\"documentation\":\"Documentation\",\"doubleClick\":\"double-click\",\"drag\":\"drag\",\"editor\":\"Editor\",\"editLineArrowPoints\":\"Edit line/arrow points\",\"editText\":\"Edit text / add label\",\"github\":\"Found an issue? Submit\",\"howto\":\"Follow our guides\",\"or\":\"or\",\"preventBinding\":\"Prevent arrow binding\",\"tools\":\"Tools\",\"shortcuts\":\"Keyboard shortcuts\",\"textFinish\":\"Finish editing (text editor)\",\"textNewLine\":\"Add new line (text editor)\",\"title\":\"Help\",\"view\":\"View\",\"zoomToFit\":\"Zoom to fit all elements\",\"zoomToSelection\":\"Zoom to selection\",\"toggleElementLock\":\"Lock/unlock selection\",\"movePageUpDown\":\"Move page up/down\",\"movePageLeftRight\":\"Move page left/right\"},\"clearCanvasDialog\":{\"title\":\"Clear canvas\"},\"publishDialog\":{\"title\":\"Publish library\",\"itemName\":\"Item name\",\"authorName\":\"Author name\",\"githubUsername\":\"GitHub username\",\"twitterUsername\":\"Twitter username\",\"libraryName\":\"Library name\",\"libraryDesc\":\"Library description\",\"website\":\"Website\",\"placeholder\":{\"authorName\":\"Your name or username\",\"libraryName\":\"Name of your library\",\"libraryDesc\":\"Description of your library to help people understand its usage\",\"githubHandle\":\"GitHub handle (optional), so you can edit the library once submitted for review\",\"twitterHandle\":\"Twitter username (optional), so we know who to credit when promoting over Twitter\",\"website\":\"Link to your personal website or elsewhere (optional)\"},\"errors\":{\"required\":\"Required\",\"website\":\"Enter a valid URL\"},\"noteDescription\":\"Submit your library to be included in the <link>public library repository</link> for other people to use in their drawings.\",\"noteGuidelines\":\"The library needs to be manually approved first. Please read the <link>guidelines</link> before submitting. You will need a GitHub account to communicate and make changes if requested, but it is not strictly required.\",\"noteLicense\":\"By submitting, you agree the library will be published under the <link>MIT License</link>, which in short means anyone can use them without restrictions.\",\"noteItems\":\"Each library item must have its own name so it\\'s filterable. The following library items will be included:\",\"atleastOneLibItem\":\"Please select at least one library item to get started\",\"republishWarning\":\"Note: some of the selected items are marked as already published/submitted. You should only resubmit items when updating an existing library or submission.\"},\"publishSuccessDialog\":{\"title\":\"Library submitted\",\"content\":\"Thank you {{authorName}}. Your library has been submitted for review. You can track the status <link>here</link>\"},\"confirmDialog\":{\"resetLibrary\":\"Reset library\",\"removeItemsFromLib\":\"Remove selected items from library\"},\"imageExportDialog\":{\"header\":\"Export image\",\"label\":{\"withBackground\":\"Background\",\"onlySelected\":\"Only selected\",\"darkMode\":\"Dark mode\",\"embedScene\":\"Embed scene\",\"scale\":\"Scale\",\"padding\":\"Padding\"},\"tooltip\":{\"embedScene\":\"Scene data will be saved into the exported PNG/SVG file so that the scene can be restored from it.\\\\nWill increase exported file size.\"},\"title\":{\"exportToPng\":\"Export to PNG\",\"exportToSvg\":\"Export to SVG\",\"copyPngToClipboard\":\"Copy PNG to clipboard\"},\"button\":{\"exportToPng\":\"PNG\",\"exportToSvg\":\"SVG\",\"copyPngToClipboard\":\"Copy to clipboard\"}},\"encrypted\":{\"tooltip\":\"Your drawings are end-to-end encrypted so Excalidraw\\'s servers will never see them.\",\"link\":\"Blog post on end-to-end encryption in Excalidraw\"},\"stats\":{\"angle\":\"Angle\",\"element\":\"Element\",\"elements\":\"Elements\",\"height\":\"Height\",\"scene\":\"Scene\",\"selected\":\"Selected\",\"storage\":\"Storage\",\"title\":\"Stats for nerds\",\"total\":\"Total\",\"version\":\"Version\",\"versionCopy\":\"Click to copy\",\"versionNotAvailable\":\"Version not available\",\"width\":\"Width\"},\"toast\":{\"addedToLibrary\":\"Added to library\",\"copyStyles\":\"Copied styles.\",\"copyToClipboard\":\"Copied to clipboard.\",\"copyToClipboardAsPng\":\"Copied {{exportSelection}} to clipboard as PNG\\\\n({{exportColorScheme}})\",\"fileSaved\":\"File saved.\",\"fileSavedToFilename\":\"Saved to {filename}\",\"canvas\":\"canvas\",\"selection\":\"selection\",\"pasteAsSingleElement\":\"Use {{shortcut}} to paste as a single element,\\\\nor paste into an existing text editor\",\"unableToEmbed\":\"Embedding this url is currently not allowed. Raise an issue on GitHub to request the url whitelisted\",\"unrecognizedLinkFormat\":\"The link you embedded does not match the expected format. Please try to paste the \\'embed\\' string provided by the source site\"},\"colors\":{\"transparent\":\"Transparent\",\"black\":\"Black\",\"white\":\"White\",\"red\":\"Red\",\"pink\":\"Pink\",\"grape\":\"Grape\",\"violet\":\"Violet\",\"gray\":\"Gray\",\"blue\":\"Blue\",\"cyan\":\"Cyan\",\"teal\":\"Teal\",\"green\":\"Green\",\"yellow\":\"Yellow\",\"orange\":\"Orange\",\"bronze\":\"Bronze\"},\"welcomeScreen\":{\"app\":{\"center_heading\":\"All your data is saved locally in your browser.\",\"center_heading_plus\":\"Did you want to go to the Excalidraw+ instead?\",\"menuHint\":\"Export, preferences, languages, ...\"},\"defaults\":{\"menuHint\":\"Export, preferences, and more...\",\"center_heading\":\"Diagrams. Made. Simple.\",\"toolbarHint\":\"Pick a tool & Start drawing!\",\"helpHint\":\"Shortcuts & help\"}},\"colorPicker\":{\"mostUsedCustomColors\":\"Most used custom colors\",\"colors\":\"Colors\",\"shades\":\"Shades\",\"hexCode\":\"Hex code\",\"noShades\":\"No shades available for this color\"},\"overwriteConfirm\":{\"action\":{\"exportToImage\":{\"title\":\"Export as image\",\"button\":\"Export as image\",\"description\":\"Export the scene data as an image from which you can import later.\"},\"saveToDisk\":{\"title\":\"Save to disk\",\"button\":\"Save to disk\",\"description\":\"Export the scene data to a file from which you can import later.\"},\"excalidrawPlus\":{\"title\":\"Excalidraw+\",\"button\":\"Export to Excalidraw+\",\"description\":\"Save the scene to your Excalidraw+ workspace.\"}},\"modal\":{\"loadFromFile\":{\"title\":\"Load from file\",\"button\":\"Load from file\",\"description\":\"Loading from a file will <bold>replace your existing content</bold>.<br></br>You can back up your drawing first using one of the options below.\"},\"shareableLink\":{\"title\":\"Load from link\",\"button\":\"Replace my content\",\"description\":\"Loading external drawing will <bold>replace your existing content</bold>.<br></br>You can back up your drawing first by using one of the options below.\"}}},\"mermaid\":{\"title\":\"Mermaid to Excalidraw\",\"button\":\"Insert\",\"description\":\"Currently only <flowchartLink>flowcharts</flowchartLink> are supported. The other types will be rendered as image in Excalidraw.\",\"syntax\":\"Mermaid Syntax\",\"preview\":\"Preview\"}}');\n\n//# sourceURL=webpack://ExcalidrawLib/../../locales/en.json?");
5563
5640
 
5564
5641
  /***/ }),
5565
5642