UNPKG

@zsviczian/excalidraw

Version:
150 lines (115 loc) 19.6 MB
/* * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file in the browser devtools. * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) * or disable the default devtool with "devtool: false". * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-dom"), require("react/jsx-runtime")); else if(typeof define === 'function' && define.amd) define(["react", "react-dom", "react/jsx-runtime"], factory); else if(typeof exports === 'object') exports["ExcalidrawLib"] = factory(require("react"), require("react-dom"), require("react/jsx-runtime")); else root["ExcalidrawLib"] = factory(root["React"], root["ReactDOM"], root["React"]["jsxRuntime"]); })(globalThis, (__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__) => { return /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "../../node_modules/@braintree/sanitize-url/dist/index.js": /*!****************************************************************!*\ !*** ../../node_modules/@braintree/sanitize-url/dist/index.js ***! \****************************************************************/ /***/ ((__unused_webpack_module, exports) => { "use strict"; eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.sanitizeUrl = void 0;\nvar invalidProtocolRegex = /^([^\\w]*)(javascript|data|vbscript)/im;\nvar htmlEntitiesRegex = /&#(\\w+)(^\\w|;)?/g;\nvar htmlCtrlEntityRegex = /&(newline|tab);/gi;\nvar ctrlCharactersRegex = /[\\u0000-\\u001F\\u007F-\\u009F\\u2000-\\u200D\\uFEFF]/gim;\nvar urlSchemeRegex = /^.+(:|&colon;)/gim;\nvar relativeFirstCharacters = [\".\", \"/\"];\nfunction isRelativeUrlWithoutProtocol(url) {\n return relativeFirstCharacters.indexOf(url[0]) > -1;\n}\n// adapted from https://stackoverflow.com/a/29824550/2601552\nfunction decodeHtmlCharacters(str) {\n return str.replace(htmlEntitiesRegex, function (match, dec) {\n return String.fromCharCode(dec);\n });\n}\nfunction sanitizeUrl(url) {\n var sanitizedUrl = decodeHtmlCharacters(url || \"\")\n .replace(htmlCtrlEntityRegex, \"\")\n .replace(ctrlCharactersRegex, \"\")\n .trim();\n if (!sanitizedUrl) {\n return \"about:blank\";\n }\n if (isRelativeUrlWithoutProtocol(sanitizedUrl)) {\n return sanitizedUrl;\n }\n var urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex);\n if (!urlSchemeParseResults) {\n return sanitizedUrl;\n }\n var urlScheme = urlSchemeParseResults[0];\n if (invalidProtocolRegex.test(urlScheme)) {\n return \"about:blank\";\n }\n return sanitizedUrl;\n}\nexports.sanitizeUrl = sanitizeUrl;\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@braintree/sanitize-url/dist/index.js?"); /***/ }), /***/ "../../node_modules/@chevrotain/cst-dts-gen/lib/src/api.js": /*!*****************************************************************!*\ !*** ../../node_modules/@chevrotain/cst-dts-gen/lib/src/api.js ***! \*****************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ generateCstDts: () => (/* binding */ generateCstDts)\n/* harmony export */ });\n/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./model.js */ \"../../node_modules/@chevrotain/cst-dts-gen/lib/src/model.js\");\n/* harmony import */ var _generate_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./generate.js */ \"../../node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js\");\n\n\nconst defaultOptions = {\n includeVisitorInterface: true,\n visitorInterfaceName: \"ICstNodeVisitor\",\n};\nfunction generateCstDts(productions, options) {\n const effectiveOptions = Object.assign(Object.assign({}, defaultOptions), options);\n const model = (0,_model_js__WEBPACK_IMPORTED_MODULE_0__.buildModel)(productions);\n return (0,_generate_js__WEBPACK_IMPORTED_MODULE_1__.genDts)(model, effectiveOptions);\n}\n//# sourceMappingURL=api.js.map\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@chevrotain/cst-dts-gen/lib/src/api.js?"); /***/ }), /***/ "../../node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js": /*!**********************************************************************!*\ !*** ../../node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js ***! \**********************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ genDts: () => (/* binding */ genDts)\n/* harmony export */ });\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/flatten.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/map.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/isArray.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/uniq.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/reduce.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/upperFirst.js\");\n\nfunction genDts(model, options) {\n let contentParts = [];\n contentParts = contentParts.concat(`import type { CstNode, ICstVisitor, IToken } from \"chevrotain\";`);\n contentParts = contentParts.concat((0,lodash_es__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,lodash_es__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(model, (node) => genCstNodeTypes(node))));\n if (options.includeVisitorInterface) {\n contentParts = contentParts.concat(genVisitor(options.visitorInterfaceName, model));\n }\n return contentParts.join(\"\\n\\n\") + \"\\n\";\n}\nfunction genCstNodeTypes(node) {\n const nodeCstInterface = genNodeInterface(node);\n const nodeChildrenInterface = genNodeChildrenType(node);\n return [nodeCstInterface, nodeChildrenInterface];\n}\nfunction genNodeInterface(node) {\n const nodeInterfaceName = getNodeInterfaceName(node.name);\n const childrenTypeName = getNodeChildrenTypeName(node.name);\n return `export interface ${nodeInterfaceName} extends CstNode {\n name: \"${node.name}\";\n children: ${childrenTypeName};\n}`;\n}\nfunction genNodeChildrenType(node) {\n const typeName = getNodeChildrenTypeName(node.name);\n return `export type ${typeName} = {\n ${(0,lodash_es__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(node.properties, (property) => genChildProperty(property)).join(\"\\n \")}\n};`;\n}\nfunction genChildProperty(prop) {\n const typeName = buildTypeString(prop.type);\n return `${prop.name}${prop.optional ? \"?\" : \"\"}: ${typeName}[];`;\n}\nfunction genVisitor(name, nodes) {\n return `export interface ${name}<IN, OUT> extends ICstVisitor<IN, OUT> {\n ${(0,lodash_es__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(nodes, (node) => genVisitorFunction(node)).join(\"\\n \")}\n}`;\n}\nfunction genVisitorFunction(node) {\n const childrenTypeName = getNodeChildrenTypeName(node.name);\n return `${node.name}(children: ${childrenTypeName}, param?: IN): OUT;`;\n}\nfunction buildTypeString(type) {\n if ((0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(type)) {\n const typeNames = (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])((0,lodash_es__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(type, (t) => getTypeString(t)));\n const typeString = (0,lodash_es__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(typeNames, (sum, t) => sum + \" | \" + t);\n return \"(\" + typeString + \")\";\n }\n else {\n return getTypeString(type);\n }\n}\nfunction getTypeString(type) {\n if (type.kind === \"token\") {\n return \"IToken\";\n }\n return getNodeInterfaceName(type.name);\n}\nfunction getNodeInterfaceName(ruleName) {\n return (0,lodash_es__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(ruleName) + \"CstNode\";\n}\nfunction getNodeChildrenTypeName(ruleName) {\n return (0,lodash_es__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(ruleName) + \"CstChildren\";\n}\n//# sourceMappingURL=generate.js.map\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@chevrotain/cst-dts-gen/lib/src/generate.js?"); /***/ }), /***/ "../../node_modules/@chevrotain/cst-dts-gen/lib/src/model.js": /*!*******************************************************************!*\ !*** ../../node_modules/@chevrotain/cst-dts-gen/lib/src/model.js ***! \*******************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ buildModel: () => (/* binding */ buildModel)\n/* harmony export */ });\n/* harmony import */ var _chevrotain_gast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @chevrotain/gast */ \"../../node_modules/@chevrotain/gast/lib/src/api.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/values.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/map.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/groupBy.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/some.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/assign.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/flatten.js\");\n\n\nfunction buildModel(productions) {\n const generator = new CstNodeDefinitionGenerator();\n const allRules = (0,lodash_es__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(productions);\n return (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(allRules, (rule) => generator.visitRule(rule));\n}\nclass CstNodeDefinitionGenerator extends _chevrotain_gast__WEBPACK_IMPORTED_MODULE_0__.GAstVisitor {\n visitRule(node) {\n const rawElements = this.visitEach(node.definition);\n const grouped = (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(rawElements, (el) => el.propertyName);\n const properties = (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(grouped, (group, propertyName) => {\n const allNullable = !(0,lodash_es__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(group, (el) => !el.canBeNull);\n // In an alternation with a label a property name can have\n // multiple types.\n let propertyType = group[0].type;\n if (group.length > 1) {\n propertyType = (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(group, (g) => g.type);\n }\n return {\n name: propertyName,\n type: propertyType,\n optional: allNullable,\n };\n });\n return {\n name: node.name,\n properties: properties,\n };\n }\n visitAlternative(node) {\n return this.visitEachAndOverrideWith(node.definition, { canBeNull: true });\n }\n visitOption(node) {\n return this.visitEachAndOverrideWith(node.definition, { canBeNull: true });\n }\n visitRepetition(node) {\n return this.visitEachAndOverrideWith(node.definition, { canBeNull: true });\n }\n visitRepetitionMandatory(node) {\n return this.visitEach(node.definition);\n }\n visitRepetitionMandatoryWithSeparator(node) {\n return this.visitEach(node.definition).concat({\n propertyName: node.separator.name,\n canBeNull: true,\n type: getType(node.separator),\n });\n }\n visitRepetitionWithSeparator(node) {\n return this.visitEachAndOverrideWith(node.definition, {\n canBeNull: true,\n }).concat({\n propertyName: node.separator.name,\n canBeNull: true,\n type: getType(node.separator),\n });\n }\n visitAlternation(node) {\n return this.visitEachAndOverrideWith(node.definition, { canBeNull: true });\n }\n visitTerminal(node) {\n return [\n {\n propertyName: node.label || node.terminalType.name,\n canBeNull: false,\n type: getType(node),\n },\n ];\n }\n visitNonTerminal(node) {\n return [\n {\n propertyName: node.label || node.nonTerminalName,\n canBeNull: false,\n type: getType(node),\n },\n ];\n }\n visitEachAndOverrideWith(definition, override) {\n return (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this.visitEach(definition), (definition) => (0,lodash_es__WEBPACK_IMPORTED_MODULE_5__[\"default\"])({}, definition, override));\n }\n visitEach(definition) {\n return (0,lodash_es__WEBPACK_IMPORTED_MODULE_6__[\"default\"])((0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(definition, (definition) => this.visit(definition)));\n }\n}\nfunction getType(production) {\n if (production instanceof _chevrotain_gast__WEBPACK_IMPORTED_MODULE_0__.NonTerminal) {\n return {\n kind: \"rule\",\n name: production.referencedRule.name,\n };\n }\n return { kind: \"token\" };\n}\n//# sourceMappingURL=model.js.map\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@chevrotain/cst-dts-gen/lib/src/model.js?"); /***/ }), /***/ "../../node_modules/@chevrotain/gast/lib/src/api.js": /*!**********************************************************!*\ !*** ../../node_modules/@chevrotain/gast/lib/src/api.js ***! \**********************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Alternation: () => (/* reexport safe */ _model_js__WEBPACK_IMPORTED_MODULE_0__.Alternation),\n/* harmony export */ Alternative: () => (/* reexport safe */ _model_js__WEBPACK_IMPORTED_MODULE_0__.Alternative),\n/* harmony export */ GAstVisitor: () => (/* reexport safe */ _visitor_js__WEBPACK_IMPORTED_MODULE_1__.GAstVisitor),\n/* harmony export */ NonTerminal: () => (/* reexport safe */ _model_js__WEBPACK_IMPORTED_MODULE_0__.NonTerminal),\n/* harmony export */ Option: () => (/* reexport safe */ _model_js__WEBPACK_IMPORTED_MODULE_0__.Option),\n/* harmony export */ Repetition: () => (/* reexport safe */ _model_js__WEBPACK_IMPORTED_MODULE_0__.Repetition),\n/* harmony export */ RepetitionMandatory: () => (/* reexport safe */ _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionMandatory),\n/* harmony export */ RepetitionMandatoryWithSeparator: () => (/* reexport safe */ _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionMandatoryWithSeparator),\n/* harmony export */ RepetitionWithSeparator: () => (/* reexport safe */ _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionWithSeparator),\n/* harmony export */ Rule: () => (/* reexport safe */ _model_js__WEBPACK_IMPORTED_MODULE_0__.Rule),\n/* harmony export */ Terminal: () => (/* reexport safe */ _model_js__WEBPACK_IMPORTED_MODULE_0__.Terminal),\n/* harmony export */ getProductionDslName: () => (/* reexport safe */ _helpers_js__WEBPACK_IMPORTED_MODULE_2__.getProductionDslName),\n/* harmony export */ isBranchingProd: () => (/* reexport safe */ _helpers_js__WEBPACK_IMPORTED_MODULE_2__.isBranchingProd),\n/* harmony export */ isOptionalProd: () => (/* reexport safe */ _helpers_js__WEBPACK_IMPORTED_MODULE_2__.isOptionalProd),\n/* harmony export */ isSequenceProd: () => (/* reexport safe */ _helpers_js__WEBPACK_IMPORTED_MODULE_2__.isSequenceProd),\n/* harmony export */ serializeGrammar: () => (/* reexport safe */ _model_js__WEBPACK_IMPORTED_MODULE_0__.serializeGrammar),\n/* harmony export */ serializeProduction: () => (/* reexport safe */ _model_js__WEBPACK_IMPORTED_MODULE_0__.serializeProduction)\n/* harmony export */ });\n/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./model.js */ \"../../node_modules/@chevrotain/gast/lib/src/model.js\");\n/* harmony import */ var _visitor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./visitor.js */ \"../../node_modules/@chevrotain/gast/lib/src/visitor.js\");\n/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers.js */ \"../../node_modules/@chevrotain/gast/lib/src/helpers.js\");\n\n\n\n//# sourceMappingURL=api.js.map\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@chevrotain/gast/lib/src/api.js?"); /***/ }), /***/ "../../node_modules/@chevrotain/gast/lib/src/helpers.js": /*!**************************************************************!*\ !*** ../../node_modules/@chevrotain/gast/lib/src/helpers.js ***! \**************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getProductionDslName: () => (/* binding */ getProductionDslName),\n/* harmony export */ isBranchingProd: () => (/* binding */ isBranchingProd),\n/* harmony export */ isOptionalProd: () => (/* binding */ isOptionalProd),\n/* harmony export */ isSequenceProd: () => (/* binding */ isSequenceProd)\n/* harmony export */ });\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/some.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/includes.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/every.js\");\n/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./model.js */ \"../../node_modules/@chevrotain/gast/lib/src/model.js\");\n\n\nfunction isSequenceProd(prod) {\n return (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Alternative ||\n prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Option ||\n prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Repetition ||\n prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionMandatory ||\n prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionMandatoryWithSeparator ||\n prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionWithSeparator ||\n prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Terminal ||\n prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Rule);\n}\nfunction isOptionalProd(prod, alreadyVisited = []) {\n const isDirectlyOptional = prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Option ||\n prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Repetition ||\n prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionWithSeparator;\n if (isDirectlyOptional) {\n return true;\n }\n // note that this can cause infinite loop if one optional empty TOP production has a cyclic dependency with another\n // empty optional top rule\n // may be indirectly optional ((A?B?C?) | (D?E?F?))\n if (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Alternation) {\n // for OR its enough for just one of the alternatives to be optional\n return (0,lodash_es__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(prod.definition, (subProd) => {\n return isOptionalProd(subProd, alreadyVisited);\n });\n }\n else if (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.NonTerminal && (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(alreadyVisited, prod)) {\n // avoiding stack overflow due to infinite recursion\n return false;\n }\n else if (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.AbstractProduction) {\n if (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.NonTerminal) {\n alreadyVisited.push(prod);\n }\n return (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(prod.definition, (subProd) => {\n return isOptionalProd(subProd, alreadyVisited);\n });\n }\n else {\n return false;\n }\n}\nfunction isBranchingProd(prod) {\n return prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Alternation;\n}\nfunction getProductionDslName(prod) {\n /* istanbul ignore else */\n if (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.NonTerminal) {\n return \"SUBRULE\";\n }\n else if (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Option) {\n return \"OPTION\";\n }\n else if (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Alternation) {\n return \"OR\";\n }\n else if (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionMandatory) {\n return \"AT_LEAST_ONE\";\n }\n else if (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionMandatoryWithSeparator) {\n return \"AT_LEAST_ONE_SEP\";\n }\n else if (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionWithSeparator) {\n return \"MANY_SEP\";\n }\n else if (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Repetition) {\n return \"MANY\";\n }\n else if (prod instanceof _model_js__WEBPACK_IMPORTED_MODULE_0__.Terminal) {\n return \"CONSUME\";\n /* c8 ignore next 3 */\n }\n else {\n throw Error(\"non exhaustive match\");\n }\n}\n//# sourceMappingURL=helpers.js.map\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@chevrotain/gast/lib/src/helpers.js?"); /***/ }), /***/ "../../node_modules/@chevrotain/gast/lib/src/model.js": /*!************************************************************!*\ !*** ../../node_modules/@chevrotain/gast/lib/src/model.js ***! \************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ AbstractProduction: () => (/* binding */ AbstractProduction),\n/* harmony export */ Alternation: () => (/* binding */ Alternation),\n/* harmony export */ Alternative: () => (/* binding */ Alternative),\n/* harmony export */ NonTerminal: () => (/* binding */ NonTerminal),\n/* harmony export */ Option: () => (/* binding */ Option),\n/* harmony export */ Repetition: () => (/* binding */ Repetition),\n/* harmony export */ RepetitionMandatory: () => (/* binding */ RepetitionMandatory),\n/* harmony export */ RepetitionMandatoryWithSeparator: () => (/* binding */ RepetitionMandatoryWithSeparator),\n/* harmony export */ RepetitionWithSeparator: () => (/* binding */ RepetitionWithSeparator),\n/* harmony export */ Rule: () => (/* binding */ Rule),\n/* harmony export */ Terminal: () => (/* binding */ Terminal),\n/* harmony export */ serializeGrammar: () => (/* binding */ serializeGrammar),\n/* harmony export */ serializeProduction: () => (/* binding */ serializeProduction)\n/* harmony export */ });\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/isString.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/forEach.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/assign.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/pickBy.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/map.js\");\n/* harmony import */ var lodash_es__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash-es */ \"../../node_modules/lodash-es/isRegExp.js\");\n\n// TODO: duplicated code to avoid extracting another sub-package -- how to avoid?\nfunction tokenLabel(tokType) {\n if (hasTokenLabel(tokType)) {\n return tokType.LABEL;\n }\n else {\n return tokType.name;\n }\n}\n// TODO: duplicated code to avoid extracting another sub-package -- how to avoid?\nfunction hasTokenLabel(obj) {\n return (0,lodash_es__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(obj.LABEL) && obj.LABEL !== \"\";\n}\nclass AbstractProduction {\n get definition() {\n return this._definition;\n }\n set definition(value) {\n this._definition = value;\n }\n constructor(_definition) {\n this._definition = _definition;\n }\n accept(visitor) {\n visitor.visit(this);\n (0,lodash_es__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.definition, (prod) => {\n prod.accept(visitor);\n });\n }\n}\nclass NonTerminal extends AbstractProduction {\n constructor(options) {\n super([]);\n this.idx = 1;\n (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(options, (v) => v !== undefined));\n }\n set definition(definition) {\n // immutable\n }\n get definition() {\n if (this.referencedRule !== undefined) {\n return this.referencedRule.definition;\n }\n return [];\n }\n accept(visitor) {\n visitor.visit(this);\n // don't visit children of a reference, we will get cyclic infinite loops if we do so\n }\n}\nclass Rule extends AbstractProduction {\n constructor(options) {\n super(options.definition);\n this.orgText = \"\";\n (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(options, (v) => v !== undefined));\n }\n}\nclass Alternative extends AbstractProduction {\n constructor(options) {\n super(options.definition);\n this.ignoreAmbiguities = false;\n (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(options, (v) => v !== undefined));\n }\n}\nclass Option extends AbstractProduction {\n constructor(options) {\n super(options.definition);\n this.idx = 1;\n (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(options, (v) => v !== undefined));\n }\n}\nclass RepetitionMandatory extends AbstractProduction {\n constructor(options) {\n super(options.definition);\n this.idx = 1;\n (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(options, (v) => v !== undefined));\n }\n}\nclass RepetitionMandatoryWithSeparator extends AbstractProduction {\n constructor(options) {\n super(options.definition);\n this.idx = 1;\n (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(options, (v) => v !== undefined));\n }\n}\nclass Repetition extends AbstractProduction {\n constructor(options) {\n super(options.definition);\n this.idx = 1;\n (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(options, (v) => v !== undefined));\n }\n}\nclass RepetitionWithSeparator extends AbstractProduction {\n constructor(options) {\n super(options.definition);\n this.idx = 1;\n (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(options, (v) => v !== undefined));\n }\n}\nclass Alternation extends AbstractProduction {\n get definition() {\n return this._definition;\n }\n set definition(value) {\n this._definition = value;\n }\n constructor(options) {\n super(options.definition);\n this.idx = 1;\n this.ignoreAmbiguities = false;\n this.hasPredicates = false;\n (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(options, (v) => v !== undefined));\n }\n}\nclass Terminal {\n constructor(options) {\n this.idx = 1;\n (0,lodash_es__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, (0,lodash_es__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(options, (v) => v !== undefined));\n }\n accept(visitor) {\n visitor.visit(this);\n }\n}\nfunction serializeGrammar(topRules) {\n return (0,lodash_es__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(topRules, serializeProduction);\n}\nfunction serializeProduction(node) {\n function convertDefinition(definition) {\n return (0,lodash_es__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(definition, serializeProduction);\n }\n /* istanbul ignore else */\n if (node instanceof NonTerminal) {\n const serializedNonTerminal = {\n type: \"NonTerminal\",\n name: node.nonTerminalName,\n idx: node.idx,\n };\n if ((0,lodash_es__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node.label)) {\n serializedNonTerminal.label = node.label;\n }\n return serializedNonTerminal;\n }\n else if (node instanceof Alternative) {\n return {\n type: \"Alternative\",\n definition: convertDefinition(node.definition),\n };\n }\n else if (node instanceof Option) {\n return {\n type: \"Option\",\n idx: node.idx,\n definition: convertDefinition(node.definition),\n };\n }\n else if (node instanceof RepetitionMandatory) {\n return {\n type: \"RepetitionMandatory\",\n idx: node.idx,\n definition: convertDefinition(node.definition),\n };\n }\n else if (node instanceof RepetitionMandatoryWithSeparator) {\n return {\n type: \"RepetitionMandatoryWithSeparator\",\n idx: node.idx,\n separator: (serializeProduction(new Terminal({ terminalType: node.separator }))),\n definition: convertDefinition(node.definition),\n };\n }\n else if (node instanceof RepetitionWithSeparator) {\n return {\n type: \"RepetitionWithSeparator\",\n idx: node.idx,\n separator: (serializeProduction(new Terminal({ terminalType: node.separator }))),\n definition: convertDefinition(node.definition),\n };\n }\n else if (node instanceof Repetition) {\n return {\n type: \"Repetition\",\n idx: node.idx,\n definition: convertDefinition(node.definition),\n };\n }\n else if (node instanceof Alternation) {\n return {\n type: \"Alternation\",\n idx: node.idx,\n definition: convertDefinition(node.definition),\n };\n }\n else if (node instanceof Terminal) {\n const serializedTerminal = {\n type: \"Terminal\",\n name: node.terminalType.name,\n label: tokenLabel(node.terminalType),\n idx: node.idx,\n };\n if ((0,lodash_es__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node.label)) {\n serializedTerminal.terminalLabel = node.label;\n }\n const pattern = node.terminalType.PATTERN;\n if (node.terminalType.PATTERN) {\n serializedTerminal.pattern = (0,lodash_es__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(pattern)\n ? pattern.source\n : pattern;\n }\n return serializedTerminal;\n }\n else if (node instanceof Rule) {\n return {\n type: \"Rule\",\n name: node.name,\n orgText: node.orgText,\n definition: convertDefinition(node.definition),\n };\n /* c8 ignore next 3 */\n }\n else {\n throw Error(\"non exhaustive match\");\n }\n}\n//# sourceMappingURL=model.js.map\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@chevrotain/gast/lib/src/model.js?"); /***/ }), /***/ "../../node_modules/@chevrotain/gast/lib/src/visitor.js": /*!**************************************************************!*\ !*** ../../node_modules/@chevrotain/gast/lib/src/visitor.js ***! \**************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GAstVisitor: () => (/* binding */ GAstVisitor)\n/* harmony export */ });\n/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./model.js */ \"../../node_modules/@chevrotain/gast/lib/src/model.js\");\n\nclass GAstVisitor {\n visit(node) {\n const nodeAny = node;\n switch (nodeAny.constructor) {\n case _model_js__WEBPACK_IMPORTED_MODULE_0__.NonTerminal:\n return this.visitNonTerminal(nodeAny);\n case _model_js__WEBPACK_IMPORTED_MODULE_0__.Alternative:\n return this.visitAlternative(nodeAny);\n case _model_js__WEBPACK_IMPORTED_MODULE_0__.Option:\n return this.visitOption(nodeAny);\n case _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionMandatory:\n return this.visitRepetitionMandatory(nodeAny);\n case _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionMandatoryWithSeparator:\n return this.visitRepetitionMandatoryWithSeparator(nodeAny);\n case _model_js__WEBPACK_IMPORTED_MODULE_0__.RepetitionWithSeparator:\n return this.visitRepetitionWithSeparator(nodeAny);\n case _model_js__WEBPACK_IMPORTED_MODULE_0__.Repetition:\n return this.visitRepetition(nodeAny);\n case _model_js__WEBPACK_IMPORTED_MODULE_0__.Alternation:\n return this.visitAlternation(nodeAny);\n case _model_js__WEBPACK_IMPORTED_MODULE_0__.Terminal:\n return this.visitTerminal(nodeAny);\n case _model_js__WEBPACK_IMPORTED_MODULE_0__.Rule:\n return this.visitRule(nodeAny);\n /* c8 ignore next 2 */\n default:\n throw Error(\"non exhaustive match\");\n }\n }\n /* c8 ignore next */\n visitNonTerminal(node) { }\n /* c8 ignore next */\n visitAlternative(node) { }\n /* c8 ignore next */\n visitOption(node) { }\n /* c8 ignore next */\n visitRepetition(node) { }\n /* c8 ignore next */\n visitRepetitionMandatory(node) { }\n /* c8 ignore next 3 */\n visitRepetitionMandatoryWithSeparator(node) { }\n /* c8 ignore next */\n visitRepetitionWithSeparator(node) { }\n /* c8 ignore next */\n visitAlternation(node) { }\n /* c8 ignore next */\n visitTerminal(node) { }\n /* c8 ignore next */\n visitRule(node) { }\n}\n//# sourceMappingURL=visitor.js.map\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@chevrotain/gast/lib/src/visitor.js?"); /***/ }), /***/ "../../node_modules/@chevrotain/regexp-to-ast/lib/src/api.js": /*!*******************************************************************!*\ !*** ../../node_modules/@chevrotain/regexp-to-ast/lib/src/api.js ***! \*******************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BaseRegExpVisitor: () => (/* reexport safe */ _base_regexp_visitor_js__WEBPACK_IMPORTED_MODULE_1__.BaseRegExpVisitor),\n/* harmony export */ RegExpParser: () => (/* reexport safe */ _regexp_parser_js__WEBPACK_IMPORTED_MODULE_0__.RegExpParser)\n/* harmony export */ });\n/* harmony import */ var _regexp_parser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./regexp-parser.js */ \"../../node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js\");\n/* harmony import */ var _base_regexp_visitor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base-regexp-visitor.js */ \"../../node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js\");\n\n\n//# sourceMappingURL=api.js.map\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@chevrotain/regexp-to-ast/lib/src/api.js?"); /***/ }), /***/ "../../node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js": /*!***********************************************************************************!*\ !*** ../../node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js ***! \***********************************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BaseRegExpVisitor: () => (/* binding */ BaseRegExpVisitor)\n/* harmony export */ });\nclass BaseRegExpVisitor {\n visitChildren(node) {\n for (const key in node) {\n const child = node[key];\n /* istanbul ignore else */\n if (node.hasOwnProperty(key)) {\n if (child.type !== undefined) {\n this.visit(child);\n }\n else if (Array.isArray(child)) {\n child.forEach((subChild) => {\n this.visit(subChild);\n }, this);\n }\n }\n }\n }\n visit(node) {\n switch (node.type) {\n case \"Pattern\":\n this.visitPattern(node);\n break;\n case \"Flags\":\n this.visitFlags(node);\n break;\n case \"Disjunction\":\n this.visitDisjunction(node);\n break;\n case \"Alternative\":\n this.visitAlternative(node);\n break;\n case \"StartAnchor\":\n this.visitStartAnchor(node);\n break;\n case \"EndAnchor\":\n this.visitEndAnchor(node);\n break;\n case \"WordBoundary\":\n this.visitWordBoundary(node);\n break;\n case \"NonWordBoundary\":\n this.visitNonWordBoundary(node);\n break;\n case \"Lookahead\":\n this.visitLookahead(node);\n break;\n case \"NegativeLookahead\":\n this.visitNegativeLookahead(node);\n break;\n case \"Character\":\n this.visitCharacter(node);\n break;\n case \"Set\":\n this.visitSet(node);\n break;\n case \"Group\":\n this.visitGroup(node);\n break;\n case \"GroupBackReference\":\n this.visitGroupBackReference(node);\n break;\n case \"Quantifier\":\n this.visitQuantifier(node);\n break;\n }\n this.visitChildren(node);\n }\n visitPattern(node) { }\n visitFlags(node) { }\n visitDisjunction(node) { }\n visitAlternative(node) { }\n // Assertion\n visitStartAnchor(node) { }\n visitEndAnchor(node) { }\n visitWordBoundary(node) { }\n visitNonWordBoundary(node) { }\n visitLookahead(node) { }\n visitNegativeLookahead(node) { }\n // atoms\n visitCharacter(node) { }\n visitSet(node) { }\n visitGroup(node) { }\n visitGroupBackReference(node) { }\n visitQuantifier(node) { }\n}\n//# sourceMappingURL=base-regexp-visitor.js.map\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js?"); /***/ }), /***/ "../../node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js": /*!*********************************************************************************!*\ !*** ../../node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js ***! \*********************************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ digitsCharCodes: () => (/* binding */ digitsCharCodes),\n/* harmony export */ whitespaceCodes: () => (/* binding */ whitespaceCodes),\n/* harmony export */ wordCharCodes: () => (/* binding */ wordCharCodes)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"../../node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js\");\n\nconst digitsCharCodes = [];\nfor (let i = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"0\"); i <= (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"9\"); i++) {\n digitsCharCodes.push(i);\n}\nconst wordCharCodes = [(0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"_\")].concat(digitsCharCodes);\nfor (let i = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"a\"); i <= (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"z\"); i++) {\n wordCharCodes.push(i);\n}\nfor (let i = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"A\"); i <= (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"Z\"); i++) {\n wordCharCodes.push(i);\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#character-classes\nconst whitespaceCodes = [\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\" \"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\f\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\n\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\r\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\t\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\v\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\t\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u00a0\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u1680\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u2000\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u2001\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u2002\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u2003\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u2004\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u2005\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u2006\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u2007\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u2008\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u2009\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u200a\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u2028\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u2029\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u202f\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u205f\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\u3000\"),\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.cc)(\"\\ufeff\"),\n];\n//# sourceMappingURL=character-classes.js.map\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js?"); /***/ }), /***/ "../../node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js": /*!*****************************************************************************!*\ !*** ../../node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js ***! \*****************************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RegExpParser: () => (/* binding */ RegExpParser)\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"../../node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js\");\n/* harmony import */ var _character_classes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./character-classes.js */ \"../../node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js\");\n\n\n// consts and utilities\nconst hexDigitPattern = /[0-9a-fA-F]/;\nconst decimalPattern = /[0-9]/;\nconst decimalPatternNoZero = /[1-9]/;\n// https://hackernoon.com/the-madness-of-parsing-real-world-javascript-regexps-d9ee336df983\n// https://www.ecma-international.org/ecma-262/8.0/index.html#prod-Pattern\nclass RegExpParser {\n constructor() {\n this.idx = 0;\n this.input = \"\";\n this.groupIdx = 0;\n }\n saveState() {\n return {\n idx: this.idx,\n input: this.input,\n groupIdx: this.groupIdx,\n };\n }\n restoreState(newState) {\n this.idx = newState.idx;\n this.input = newState.input;\n this.groupIdx = newState.groupIdx;\n }\n pattern(input) {\n // parser state\n this.idx = 0;\n this.input = input;\n this.groupIdx = 0;\n this.consumeChar(\"/\");\n const value = this.disjunction();\n this.consumeChar(\"/\");\n const flags = {\n type: \"Flags\",\n loc: { begin: this.idx, end: input.length },\n global: false,\n ignoreCase: false,\n multiLine: false,\n unicode: false,\n sticky: false,\n };\n while (this.isRegExpFlag()) {\n switch (this.popChar()) {\n case \"g\":\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.addFlag)(flags, \"global\");\n break;\n case \"i\":\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.addFlag)(flags, \"ignoreCase\");\n break;\n case \"m\":\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.addFlag)(flags, \"multiLine\");\n break;\n case \"u\":\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.addFlag)(flags, \"unicode\");\n break;\n case \"y\":\n (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.addFlag)(flags, \"sticky\");\n break;\n }\n }\n if (this.idx !== this.input.length) {\n throw Error(\"Redundant input: \" + this.input.substring(this.idx));\n }\n return {\n type: \"Pattern\",\n flags: flags,\n value: value,\n loc: this.loc(0),\n };\n }\n disjunction() {\n const alts = [];\n const begin = this.idx;\n alts.push(this.alternative());\n while (this.peekChar() === \"|\") {\n this.consumeChar(\"|\");\n alts.push(this.alternative());\n }\n return { type: \"Disjunction\", value: alts, loc: this.loc(begin) };\n }\n alternative() {\n const terms = [];\n const begin = this.idx;\n while (this.isTerm()) {\n terms.push(this.term());\n }\n return { type: \"Alternative\", value: terms, loc: this.loc(begin) };\n }\n term() {\n if (this.isAssertion()) {\n return this.assertion();\n }\n else {\n return this.ato